From 260e353b15ad86cdb6d3ad13005e45eb08276826 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 6 Mar 2015 16:27:52 -0800 Subject: [PATCH] CRM_Utils_Check - Allow extensions to define their own checks. --- CRM/Utils/Check.php | 3 +++ CRM/Utils/Hook.php | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CRM/Utils/Check.php b/CRM/Utils/Check.php index 4f3cd176c0..3e59c4f6c1 100644 --- a/CRM/Utils/Check.php +++ b/CRM/Utils/Check.php @@ -137,6 +137,9 @@ class CRM_Utils_Check { foreach ($checks as $check) { $messages = array_merge($messages, $check->checkAll()); } + + CRM_Utils_Hook::check($messages); + return $messages; } diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php index 7da33cda19..55f50e5ac1 100644 --- a/CRM/Utils/Hook.php +++ b/CRM/Utils/Hook.php @@ -1927,4 +1927,16 @@ abstract class CRM_Utils_Hook { ); } + /** + * Check system status. + * + * @param array $messages + * Array. A list of messages regarding system status. + * @return mixed + */ + public static function check(&$messages) { + return self::singleton() + ->invoke(1, $messages, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_check'); + } + } -- 2.25.1