unset($params['enableComponents']);
}
- // save checksum timeout
- if (!empty($params['checksumTimeout'])) {
- CRM_Core_BAO_Setting::setItem($params['checksumTimeout'],
- CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'checksum_timeout'
- );
- }
-
// verify ssl peer option
if (isset($params['verifySSL'])) {
CRM_Core_BAO_Setting::setItem($params['verifySSL'],
'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,
+ 'checksum_timeout' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
);
public $_uploadMaxSize;
$this->addFormRule(array('CRM_Admin_Form_Setting_Miscellaneous', 'formRule'), $this);
parent::buildQuickForm();
- $this->addRule('checksumTimeout', ts('Value should be a positive number'), 'positiveInteger');
+ $this->addRule('checksum_timeout', ts('Value should be a positive number'), 'positiveInteger');
}
/**
}
if (!$live) {
- $days = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'checksum_timeout',
- NULL,
- 7
- );
+ $days = Civi::settings()->get('checksum_timeout');
$live = 24 * $days;
}
'autocompleteContactSearch',
'autocompleteContactReference',
'checksumTimeout',
+ 'checksum_timeout',
);
}
'description' => NULL,
'help_text' => NULL,
),
- 'checksumTimeout' => array(
+ 'checksum_timeout' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
- 'name' => 'checksumTimeout',
- 'prefetch' => 1,
- // prefetch causes it to be cached in config settings. Usually this is a transitional setting. Some things like urls are permanent. Remove this comment if you have assessed & it should be permanent
+ 'name' => 'checksum_timeout',
'type' => 'Integer',
'quick_form_type' => 'Element',
'html_attributes' => array(
</table>
<table class="form-layout">
- <tr class="crm-miscellaneous-form-block-checksumTimeout">
- <td class="label">{$form.checksumTimeout.label}</td>
- <td>{$form.checksumTimeout.html}<br />
+ <tr class="crm-miscellaneous-form-block-checksum_timeout">
+ <td class="label">{$form.checksum_timeout.label}</td>
+ <td>{$form.checksum_timeout.html}<br />
<span class="description">{ts}The number of days before a personalized (hashed) link will expire.{/ts}</span></td>
</tr>
</table>