if (empty($_GET['snippet'])) {
// Version check and intermittent alert to admins
CRM_Utils_VersionCheck::singleton()->versionAlert();
- CRM_Utils_Check_Security::singleton()->allChecks();
+ CRM_Utils_Check_Security::singleton()->showPeriodicAlerts();
// Debug msg once per hour
if ($config->debug && CRM_Core_Permission::check('administer CiviCRM') && CRM_Core_Session::singleton()->timer('debug_alert', 3600)) {
}
}
+ /**
+ * Execute "checkAll"
+ */
+ public function showPeriodicAlerts() {
+ if (CRM_Core_Permission::check('administer CiviCRM')) {
+ $session = CRM_Core_Session::singleton();
+ if ($session->timer('check_' . __CLASS__, self::CHECK_TIMER)) {
+ $this->checkAll();
+ }
+ }
+ }
+
/**
* Run some sanity checks.
*
* @see Drupal's hook_requirements() -
* https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_requirements
*/
- public function allChecks() {
- if (CRM_Core_Permission::check('administer CiviCRM')) {
- $session = CRM_Core_Session::singleton();
- if ($session->timer('check_' . __CLASS__, self::CHECK_TIMER)) {
- CRM_Utils_Check_Security::singleton()->checkLogFileIsNotAccessible();
- CRM_Utils_Check_Security::singleton()->checkUploadsAreNotAccessible();
- CRM_Utils_Check_Security::singleton()->checkDirectoriesAreNotBrowseable();
- }
- }
+ public function checkAll() {
+ CRM_Utils_Check_Security::singleton()->checkLogFileIsNotAccessible();
+ CRM_Utils_Check_Security::singleton()->checkUploadsAreNotAccessible();
+ CRM_Utils_Check_Security::singleton()->checkDirectoriesAreNotBrowseable();
}
/**