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)
committerTim Otten <totten@civicrm.org>
Thu, 18 Aug 2016 21:45:29 +0000 (14:45 -0700)
The conditional `if ($session)` was previously applied to this code;
restoring.

CRM/Core/BAO/Cache.php

index 51f30566d19e5a73d01480426bd9609157eed133..85a79a7afe8dd3d52adb8384c29c30ca50cdbfb1 100644 (file)
@@ -307,7 +307,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',