Merge pull request #4466 from eileenmcnaughton/master
[civicrm-core.git] / CRM / Utils / Sort.php
index 7c93a5832dc497791cea78f4354e73c0d0ac8955..8f56c9dc82e68cea004d280e252be815b54e22eb 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -41,7 +41,7 @@
  * if introducing additional functionality
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $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
    *
-   * @param mixed  $vars             - assoc array as described above
+   * @param mixed $vars - assoc array as described above
    * @param string $defaultSortOrder - order to sort
    *
-   * @return void
-   * @access public
+   * @return \CRM_Utils_Sort
+  @access public
    */
   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->_link = CRM_Utils_System::makeURL($this->_urlVar);
+    $this->_link = CRM_Utils_System::makeURL($this->_urlVar, TRUE);
 
     $this->initialize($defaultSortOrder);
   }
@@ -277,6 +277,9 @@ class CRM_Utils_Sort {
   /**
    * Universal callback function for sorting by weight
    *
+   * @param $a
+   * @param $b
+   *
    * @return array of items sorted by weight
    * @access public
    */