From: Eileen McNaughton Date: Mon, 23 Jun 2014 01:05:38 +0000 (+1200) Subject: CRM-14850 transform checksumTimeout to setting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c1d3e6eebdf6607b828973807c87da75237e5d51;p=civicrm-core.git CRM-14850 transform checksumTimeout to setting --- diff --git a/CRM/Admin/Form/Setting/Miscellaneous.php b/CRM/Admin/Form/Setting/Miscellaneous.php index 1c357d9caf..57bdb4b616 100644 --- a/CRM/Admin/Form/Setting/Miscellaneous.php +++ b/CRM/Admin/Form/Setting/Miscellaneous.php @@ -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 diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 079a69f437..3c46c6807f 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -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',