CRM-14850 transform checksumTimeout to setting
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 23 Jun 2014 01:05:38 +0000 (13:05 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Mon, 23 Jun 2014 01:05:38 +0000 (13:05 +1200)
CRM/Admin/Form/Setting/Miscellaneous.php
settings/Core.setting.php

index 1c357d9cafacd52421a6149a192c7691161a6e60..57bdb4b6163e9d0b26ae258aa7df687801821671 100644 (file)
@@ -48,6 +48,7 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
     'maxFileSize' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
     'doNotAttachPDFReceipt' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
     'secondDegRelPermissions' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
+    'checksumTimeout' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
   );
 
   /**
@@ -90,20 +91,16 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
       'text', 'dashboardCacheTimeout', ts('Dashboard cache timeout'),
       array('size' => 3, 'maxlength' => 5)
     );
-    $this->addElement(
-      'text', 'checksumTimeout', ts('CheckSum Lifespan'),
-      array('size' => 2, 'maxlength' => 8)
-    );
+
     $this->addElement(
       'text', 'recaptchaOptions', ts('Recaptcha Options'),
       array('size' => 64, 'maxlength' => 64)
     );
 
-    $this->addRule('checksumTimeout', ts('Value should be a positive number'), 'positiveInteger');
-
     $this->addFormRule(array('CRM_Admin_Form_Setting_Miscellaneous', 'formRule'), $this);
 
     parent::buildQuickForm();
+    $this->addRule('checksumTimeout', ts('Value should be a positive number'), 'positiveInteger');
   }
 
   /**
@@ -137,18 +134,6 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
     return $errors;
   }
 
-  function setDefaultValues() {
-    parent::setDefaultValues();
-
-    $this->_defaults['checksumTimeout'] =
-      CRM_Core_BAO_Setting::getItem(
-        CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
-        'checksum_timeout',
-        NULL,
-        7
-      );
-    return $this->_defaults;
-  }
 
   public function postProcess() {
     // store the submitted values in an array
index 079a69f4373e6395478f01adc205cc39694f982e..3c46c6807f73b64eb9aee5da9a8512d048fc01d4 100644 (file)
@@ -528,7 +528,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl
     'group' => 'core',
     'name' => 'checksumTimeout',
     'prefetch' => 1,
-    'config_only'=> 1, //@todo - see https://wiki.civicrm.org/confluence/display/CRMDOC/Settings+Reference#SettingsReference-Convertingaconfigobjecttoasetting on removing this deprecated value
     'type' => 'Integer',
     'quick_form_type' => 'Element',
     'html_type' => 'text',