From: Tim Otten Date: Sat, 7 Mar 2015 00:27:52 +0000 (-0800) Subject: CRM_Utils_Check - Allow extensions to define their own checks. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=260e353b15ad86cdb6d3ad13005e45eb08276826;p=civicrm-core.git CRM_Utils_Check - Allow extensions to define their own checks. --- 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'); + } + }