CRM-12132 - Make special timeout for event/contrib conditional
authorTim Otten <totten@civicrm.org>
Thu, 18 Aug 2016 21:45:29 +0000 (14:45 -0700)
committerSeamus Lee <seamuslee001@gmail.com>
Tue, 23 Aug 2016 21:18:53 +0000 (07:18 +1000)
The conditional `if ($session)` was previously applied to this code;
restoring.

CRM/Core/BAO/Cache.php

index a90133129061263871e4f52886ee6d54bba3f7ff..b29595041721154b6b33062e730d841e12aefe37 100644 (file)
@@ -306,7 +306,7 @@ class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache {
   public static function cleanup($session = FALSE, $table = FALSE, $prevNext = FALSE) {
     // first delete all sessions more than 20 minutes old which are related to any potential transaction
     $timeIntervalMins = (int) Civi::settings()->get('secure_cache_timeout_minutes');
-    if (TRUE) {
+    if ($timeIntervalMins && $session) {
       $transactionPages = array(
         'CRM_Contribute_Controller_Contribution',
         'CRM_Event_Controller_Registration',