From e918c16d0e9c1135a1f4a4076a39c008bbbcffa5 Mon Sep 17 00:00:00 2001 From: Nikki Murray Date: Wed, 30 Sep 2015 17:13:30 -0400 Subject: [PATCH] fixing typos and refactoring on isVisible() --- CRM/Utils/Check/Message.php | 2 +- api/v3/System.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/Check/Message.php b/CRM/Utils/Check/Message.php index 0b76d8ad88..a49187560f 100644 --- a/CRM/Utils/Check/Message.php +++ b/CRM/Utils/Check/Message.php @@ -150,7 +150,7 @@ class CRM_Utils_Check_Message { return $array; } - public function isVisibile() { + public function isVisible() { return $this->isVisible; } diff --git a/api/v3/System.php b/api/v3/System.php index 2017d5a6fa..76ee3eba1c 100644 --- a/api/v3/System.php +++ b/api/v3/System.php @@ -103,13 +103,17 @@ function _civicrm_api3_system_check_spec(&$spec) { * @throws API_Exception */ function civicrm_api3_system_check($params) { + // array(array('name'=> $, 'severity'=>$, ...)) $returnValues = array(); + + // array(CRM_Utils_Check_Message) $messages = CRM_Utils_Check::singleton()->checkAll(); + $showHushed = CRM_Utils_Array::value('show_hushed', $params); if (!$showHushed) { foreach ($messages as $key => $message) { - if (!$message->isVisible()) { - unset($messages[$key]); + if ($message->isVisible()) { + $returnValues[] = $message->toArray(); } } } -- 2.25.1