Now that status messages can be snoozed and disabled there is no need for settings specific to version checks.
'max_attachments' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'contact_undelete' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'dashboardCacheTimeout' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'versionAlert' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'securityUpdateAlert' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'versionCheck' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
- 'versionCheckIgnoreDate' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'empoweredBy' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'logging' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'maxFileSize' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
public function checkVersion() {
$messages = array();
- if (CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert', NULL, 1)) {
+ if (Civi::settings()->get('versionCheck')) {
$vc = CRM_Utils_VersionCheck::singleton();
$newerVersion = $vc->isNewerVersionAvailable();
else {
$messages[] = new CRM_Utils_Check_Message(
__FUNCTION__,
- ts('The check for new versions of CiviCRM has been disabled.'),
+ ts('The check for new versions of CiviCRM has been disabled. <a %1>Re-enable the setting</a> to receive important security update notifications.', array(1 => CRM_Utils_System::url('civicrm/admin/setting/misc', 'reset=1'))),
ts('Update Check Disabled'),
\Psr\Log\LogLevel::NOTICE,
'fa-times-circle-o'
*/
public $localMajorVersion;
- /**
- * User setting to skip updates prior to a certain date
- *
- * @var string
- */
- public $ignoreDate;
-
/**
* Info about available versions
*
// Get the latest version and send site info
$this->pingBack();
}
- $this->ignoreDate = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionCheckIgnoreDate');
// Sort version info in ascending order for easier comparisons
ksort($this->versionInfo, SORT_NUMERIC);
if (!empty($majorVersion['releases'])) {
foreach ($majorVersion['releases'] as $release) {
if (version_compare($this->localVersion, $release['version']) < 0) {
- if (!$this->ignoreDate || $this->ignoreDate < $release['date']) {
- $newerVersion['newest'] = $release['version'];
- if (CRM_Utils_Array::value('security', $release)) {
- $newerVersion['security'] = $release['version'];
- }
+ $newerVersion['newest'] = $release['version'];
+ if (CRM_Utils_Array::value('security', $release)) {
+ $newerVersion['security'] = $release['version'];
}
}
}
'description' => 'Allow Permanent Delete for contacts who are linked to live financial transactions',
'help_text' => '',
),
- 'versionAlert' => array(
- 'group_name' => 'CiviCRM Preferences',
- 'group' => 'core',
- 'name' => 'versionAlert',
- 'type' => 'Integer',
- 'quick_form_type' => 'Element',
- 'html_type' => 'select',
- 'option_values' => array(
- '0' => 'Disabled',
- '1' => 'Display In Page Footer',
- '2' => 'Display As Popup Alert',
- '3' => 'Page Footer + Popup Alert',
- ),
- 'default' => 1,
- 'add' => '4.3',
- 'title' => 'New Version Alerts',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
- ),
- 'securityUpdateAlert' => array(
- 'group_name' => 'CiviCRM Preferences',
- 'group' => 'core',
- 'name' => 'securityUpdateAlert',
- 'type' => 'Integer',
- 'quick_form_type' => 'Element',
- 'html_type' => 'select',
- 'option_values' => array(
- '0' => 'Disabled',
- '1' => 'Display In Page Footer',
- '2' => 'Display As Popup Alert',
- '3' => 'Page Footer + Popup Alert',
- ),
- 'default' => 3,
- 'add' => '4.6',
- 'title' => 'Security Update Alerts',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
- ),
'versionCheck' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'description' => '',
'help_text' => '',
),
- 'versionCheckIgnoreDate' => array(
- 'group_name' => 'CiviCRM Preferences',
- 'group' => 'core',
- 'name' => 'versionCheckIgnoreDate',
- 'type' => 'String',
- 'quick_form_type' => 'Element',
- 'html_type' => 'text',
- 'html_attributes' => array(
- 'placeholder' => 'YYYY-MM-DD',
- ),
- 'default' => '',
- 'add' => '4.6',
- 'title' => 'Ignore Updates Prior to',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => '',
- 'help_text' => '',
- ),
'securityAlert' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'description' => 'Allow Permanent Delete for contacts who are linked to live financial transactions',
'help_text' => NULL,
),
- 'versionAlert' => array(
- 'group_name' => 'CiviCRM Preferences',
- 'group' => 'core',
- 'name' => 'versionAlert',
- 'type' => 'Boolean',
- 'quick_form_type' => 'YesNo',
- 'default' => 1,
- 'add' => '4.3',
- 'title' => 'New Version Alerts',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => "",
- 'help_text' => NULL,
- ),
'versionCheck' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'description' => "",
'help_text' => NULL,
),
- 'versionCheckIgnoreDate' => array(
- 'group_name' => 'CiviCRM Preferences',
- 'group' => 'core',
- 'name' => 'versionCheckIgnoreDate',
- 'type' => 'String',
- 'quick_form_type' => 'Element',
- 'html_type' => 'text',
- 'html_attributes' => array('placeholder' => 'YYYY-MM-DD'),
- 'default' => '',
- 'add' => '4.6',
- 'title' => 'Ignore Updates Prior to',
- 'is_domain' => 1,
- 'is_contact' => 0,
- 'description' => "",
- 'help_text' => NULL,
- ),
'securityAlert' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'group' => 'core',
'name' => 'resCacheCode',
'type' => 'String',
- 'quick_form_type' => 'Element',
- 'html_attributes' => array(
- 'size' => 16,
- 'maxlength' => 16,
- ),
- 'html_type' => 'Text',
'default' => NULL,
'add' => '4.3',
- 'title' => 'Resource Cache Code',
+ 'title' => NULL,
'is_domain' => 1,
'is_contact' => 0,
'description' => 'Code appended to resource URLs (JS/CSS) to coerce HTTP caching',
<td>{$form.versionCheck.html}<br />
<p class="description">{ts}When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.{/ts}</p></td>
</tr>
- <tr class="crm-miscellaneous-form-block-versionCheckIgnoreDate">
- <td class="label">{$form.versionCheckIgnoreDate.label}</td>
- <td>{$form.versionCheckIgnoreDate.html|crmReplace:type:date}<br />
- <p class="description">{ts}If you wish to stop receiving alerts about a current update (for example, if you have applied a security patch manually), set this to today's date.{/ts}</p></td>
- </tr>
- <tr class="crm-miscellaneous-form-block-securityUpdateAlert">
- <td class="label">{$form.securityUpdateAlert.label}</td>
- <td>{$form.securityUpdateAlert.html}<br />
- <p class="description">{ts}Alert site admins about security advisories. <strong>Strongly recommended.</strong>{/ts}</p></td>
- </tr>
- <tr class="crm-miscellaneous-form-block-versionAlert">
- <td class="label">{$form.versionAlert.label}</td>
- <td>{$form.versionAlert.html}<br />
- <p class="description">{ts}Alert site admins about all new CiviCRM releases.{/ts}</p></td>
- </tr>
<tr class="crm-miscellaneous-form-block-empoweredBy">
<td class="label">{$form.empoweredBy.label}</td>
<td>{$form.empoweredBy.html}<br />
})
}
});
- $('select[name=securityUpdateAlert]').change(function() {
- if ($(this).val() == '0') {
- CRM.confirm({message: {/literal}"{ts escape='js'}Disabling this option will prevent CiviCRM from checking for important security updates. Are you sure?{/ts}"{literal}})
- .on('crmConfirm:no', function() {
- $('select[name=securityUpdateAlert]').val('3');
- })
- }
- });
});
</script>
{/literal}
\ No newline at end of file
// Disable automatic download / installation of extensions
// $civicrm_setting['Extension Preferences']['ext_repo_url'] = false;
- // Disable version update alerts.
- // $civicrm_setting['CiviCRM Preferences']['versionAlert']; = false;
-
-
/**
* If you are using any CiviCRM script in the bin directory that
* requires authentication, then you also need to set this key.