From bca4d720415199026af3e72bf7c8517c48da4b9a Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 29 Jan 2014 06:54:48 +1300 Subject: [PATCH] CRM-14139 Group Selector Code - make static functions static ---------------------------------------- * CRM-14139: Static methods called non-statically http://issues.civicrm.org/jira/browse/CRM-14139 --- CRM/Contact/BAO/Group.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Group.php b/CRM/Contact/BAO/Group.php index 9a18004208..7184d8ca49 100644 --- a/CRM/Contact/BAO/Group.php +++ b/CRM/Contact/BAO/Group.php @@ -674,9 +674,13 @@ class CRM_Contact_BAO_Group extends CRM_Contact_DAO_Group { * @param array $params associated array for params record id. * * @return array $groupList associated array of group list + * -rp = rowcount + * -page= offset + * @todo there seems little reason for the small number of functions that call this to pass in + * params that then need to be translated in this function since they are coding them when calling * @access public */ - public function getGroupListSelector(&$params) { + static public function getGroupListSelector(&$params) { // format the params $params['offset'] = ($params['page'] - 1) * $params['rp']; $params['rowCount'] = $params['rp']; @@ -1043,7 +1047,7 @@ WHERE {$whereClause}"; return CRM_Core_DAO::singleValueQuery($query, $params); } - function whereClause(&$params, $sortBy = TRUE, $excludeHidden = TRUE) { + static function whereClause(&$params, $sortBy = TRUE, $excludeHidden = TRUE) { $values = array(); $clauses = array(); -- 2.25.1