<?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. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
* if introducing additional functionality
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
* 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();
* @access public
*/
function orderBy() {
- if (!CRM_Utils_Array::value($this->_currentSortID, $this->_vars)) {
+ if (empty($this->_vars[$this->_currentSortID])) {
return '';
}
/**
* Universal callback function for sorting by weight
*
+ * @param $a
+ * @param $b
+ *
* @return array of items sorted by weight
* @access public
*/