From 5c33ad28931c2ec59c21c0c85e0f04c4e13c921b Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Wed, 29 Apr 2015 15:38:21 -0400 Subject: [PATCH] CRM-13823 Remove standalone version checl ---------------------------------------- * CRM-13823: Admin Status Page https://issues.civicrm.org/jira/browse/CRM-13823 --- CRM/Core/Page.php | 3 +-- CRM/Utils/VersionCheck.php | 40 -------------------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 97f07de085..d3ccbfecf0 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -219,8 +219,7 @@ class CRM_Core_Page { $config = CRM_Core_Config::singleton(); - // Version check and intermittent alert to admins - CRM_Utils_VersionCheck::singleton()->versionAlert(); + // Intermittent alert to admins CRM_Utils_Check::singleton()->showPeriodicAlerts(); if ($this->useLivePageJS && diff --git a/CRM/Utils/VersionCheck.php b/CRM/Utils/VersionCheck.php index 6b7e07960e..57685e7b20 100644 --- a/CRM/Utils/VersionCheck.php +++ b/CRM/Utils/VersionCheck.php @@ -271,46 +271,6 @@ class CRM_Utils_VersionCheck { return $newerVersion; } - /** - * Alert the site admin of new versions of CiviCRM. - * Show the message once a day - */ - public function versionAlert() { - $versionAlertSetting = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert', NULL, 1); - $securityAlertSetting = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'securityUpdateAlert', NULL, 3); - $settingsUrl = CRM_Utils_System::url('civicrm/admin/setting/misc', 'reset=1', FALSE, NULL, FALSE, FALSE, TRUE); - if (CRM_Core_Permission::check('administer CiviCRM') && $securityAlertSetting > 1 && $this->isSecurityUpdateAvailable()) { - $session = CRM_Core_Session::singleton(); - if ($session->timer('version_alert', 24 * 60 * 60)) { - $msg = ts('This version of CiviCRM requires a security update.') . - ''; - $session->setStatus($msg, ts('Security Alert'), 'alert'); - CRM_Core_Resources::singleton() - ->addScriptFile('civicrm', 'templates/CRM/Admin/Form/Setting/versionCheckOptions.js'); - } - } - elseif (CRM_Core_Permission::check('administer CiviCRM') && $versionAlertSetting > 1) { - $newerVersion = $this->isNewerVersionAvailable(); - if ($newerVersion) { - $session = CRM_Core_Session::singleton(); - if ($session->timer('version_alert', 24 * 60 * 60)) { - $msg = ts('A newer version of CiviCRM is available: %1', array(1 => $newerVersion)) . - ''; - $session->setStatus($msg, ts('Update Available'), 'info'); - CRM_Core_Resources::singleton() - ->addScriptFile('civicrm', 'templates/CRM/Admin/Form/Setting/versionCheckOptions.js'); - } - } - } - } - /** * Collect info about the site to be sent as pingback data. */ -- 2.25.1