From: Donald A. Lobo Date: Fri, 31 May 2013 15:45:14 +0000 (-0700) Subject: CRM-12466 - tweak function names, debug and check query logs X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f53db5ad6dd6d9a7ebdbe9af27a96d836ba4506;p=civicrm-core.git CRM-12466 - tweak function names, debug and check query logs ---------------------------------------- * CRM-12466: Group listings don't load http://issues.civicrm.org/jira/browse/CRM-12466 --- diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 9982f38e4c..8dbea8e210 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -101,10 +101,11 @@ AND ( g.cache_date IS NULL OR * @static * @public */ - static function isGroupRefreshed($groupID, $includeHiddenGroups = FALSE) { + static function shouldGroupBeRefreshed($groupID, $includeHiddenGroups = FALSE) { $query = self::groupRefreshedClause("g.id = %1", $includeHiddenGroups); $params = array(1 => array($groupID, 'Integer')); + // if the query returns the group ID, it means the group is a valid candidate for refreshing return CRM_Core_DAO::singleValueQuery($query, $params); } @@ -385,7 +386,7 @@ WHERE id = %1 // we allow hidden groups here since we dont know if the caller wants to evaluate an // hidden group // note that we ignore the force option in this case and rely on someone else having done it - if (self::isGroupRefreshed($groupID, FALSE, TRUE)) { + if (! self::shouldGroupBeRefreshed($groupID, FALSE, TRUE)) { $lock->release(); return; }