projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4466 from eileenmcnaughton/master
[civicrm-core.git]
/
CRM
/
Utils
/
Sort.php
diff --git
a/CRM/Utils/Sort.php
b/CRM/Utils/Sort.php
index dbdd96e3c049e5126af224cb6143f8e0a87e2b23..8f56c9dc82e68cea004d280e252be815b54e22eb 100644
(file)
--- a/
CRM/Utils/Sort.php
+++ b/
CRM/Utils/Sort.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-41,7
+41,7
@@
* if introducing additional functionality
*
* @package CRM
* if introducing additional functionality
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-116,11
+116,11
@@
class CRM_Utils_Sort {
* key names of variable (which should be the same as the column name)
* value: ascending or descending
*
* key names of variable (which should be the same as the column name)
* value: ascending or descending
*
- * @param mixed
$vars
- assoc array as described above
+ * @param mixed
$vars
- assoc array as described above
* @param string $defaultSortOrder - order to sort
*
* @param string $defaultSortOrder - order to sort
*
- * @return
void
-
*
@access public
+ * @return
\CRM_Utils_Sort
+ @access public
*/
function __construct(&$vars, $defaultSortOrder = NULL) {
$this->_vars = array();
*/
function __construct(&$vars, $defaultSortOrder = NULL) {
$this->_vars = array();
@@
-139,7
+139,7
@@
class CRM_Utils_Sort {
$this->_currentSortDirection = $this->_vars[$this->_currentSortID]['direction'];
}
$this->_urlVar = self::SORT_ID;
$this->_currentSortDirection = $this->_vars[$this->_currentSortID]['direction'];
}
$this->_urlVar = self::SORT_ID;
- $this->_link = CRM_Utils_System::makeURL($this->_urlVar);
+ $this->_link = CRM_Utils_System::makeURL($this->_urlVar
, TRUE
);
$this->initialize($defaultSortOrder);
}
$this->initialize($defaultSortOrder);
}
@@
-151,7
+151,7
@@
class CRM_Utils_Sort {
* @access public
*/
function orderBy() {
* @access public
*/
function orderBy() {
- if (
!CRM_Utils_Array::value($this->_currentSortID, $this->_vars
)) {
+ if (
empty($this->_vars[$this->_currentSortID]
)) {
return '';
}
return '';
}
@@
-277,6
+277,9
@@
class CRM_Utils_Sort {
/**
* Universal callback function for sorting by weight
*
/**
* Universal callback function for sorting by weight
*
+ * @param $a
+ * @param $b
+ *
* @return array of items sorted by weight
* @access public
*/
* @return array of items sorted by weight
* @access public
*/