From: Donald A. Lobo Date: Fri, 10 May 2013 15:54:48 +0000 (-0700) Subject: CRM-12466 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e2422b8f35e025a4702e962da323bcd84b522b26;hp=d43d3a54c7cd0216f9b3e746c6fcfc29f811e748;p=civicrm-core.git CRM-12466 ---------------------------------------- * 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 c10898fc5d..33f59d79c0 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -93,11 +93,13 @@ class CRM_Contact_BAO_GroupContactCache extends CRM_Contact_DAO_GroupContactCach $limitClause = " LIMIT 0, $limit"; $orderClause = " ORDER BY g.cache_date, g.refresh_date"; } + // We ignore hidden groups and disabled groups $query = " SELECT g.id FROM civicrm_group g WHERE ( g.saved_search_id IS NOT NULL OR g.children IS NOT NULL ) AND ( g.is_hidden = 0 OR g.is_hidden IS NULL ) +AND g.is_active = 1 AND ( g.cache_date IS NULL OR ( TIMESTAMPDIFF(MINUTE, g.cache_date, $now) >= $smartGroupCacheTimeout ) OR ( $now >= g.refresh_date )