manual merging CRM/Contact/BAO/GroupContactCache.php
authork054 <k@fsf.org>
Tue, 24 May 2016 14:59:52 +0000 (10:59 -0400)
committerk054 <k@fsf.org>
Tue, 24 May 2016 14:59:52 +0000 (10:59 -0400)
1  2 
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/GroupContactCache.php
api/v3/Contact.php

Simple merge
index b9da3338c86ed1c00daab3fb482bc377c00d40c0,f08284a69fc1153e9df898b151fa43463c20c08b..0782bf54633730a761cecbba784d9e6dbb1eb1d7
@@@ -336,16 -334,12 +336,19 @@@ SET    cache_date = null
  ";
        }
        else {
          $query = "
  DELETE     gc
 -FROM       civicrm_group_contact_cache gc
 -INNER JOIN civicrm_group g ON g.id = gc.group_id
 -WHERE      g.cache_date <= %1
++
 +FROM       civicrm_group_contact_cache AS gc
 +INNER JOIN (
 +      SELECT id
 +      FROM   civicrm_group
 +      WHERE  TIMESTAMPDIFF(MINUTE, cache_date, $now) >= $smartGroupCacheTimeout
 +      LIMIT  $deleteLimit
 +     ) AS g
 +ON g.id=gc.group_id
++
  ";
          $update = "
  UPDATE civicrm_group g
Simple merge