From 00eef6838b720e1f70fbfc55991a9166e6060524 Mon Sep 17 00:00:00 2001 From: Andrew Hunt Date: Sat, 14 Nov 2015 17:18:42 -0500 Subject: [PATCH] CRM-17575 System Check - stop alert for hushed messages ---------------------------------------- * CRM-17575: Hidden alerts still pop up https://issues.civicrm.org/jira/browse/CRM-17575 --- CRM/Utils/Check.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/Check.php b/CRM/Utils/Check.php index f1b5cd281b..6201be40e1 100644 --- a/CRM/Utils/Check.php +++ b/CRM/Utils/Check.php @@ -81,6 +81,9 @@ class CRM_Utils_Check { $statusMessages = array(); $statusType = 'alert'; foreach ($messages as $message) { + if (!$message->isVisible()) { + continue; + } if ($filter === TRUE || $message->getSeverity() >= 3) { $statusType = $message->getSeverity() >= 4 ? 'error' : $statusType; $statusMessage = $message->getMessage(); @@ -209,7 +212,7 @@ class CRM_Utils_Check { foreach ($messages as $key => $message) { $hush = self::checkHushSnooze($message); - $message->setVisible(!$hush); + $messages[$key]->setVisible(!$hush); } uasort($messages, array(__CLASS__, 'severitySort')); @@ -232,7 +235,8 @@ class CRM_Utils_Check { /** * Evaluate if a system check should be hushed/snoozed. * - * @param string $message + * @param CRM_Utils_Check_Message $message + * The message to evaluate. * * @return bool * TRUE means hush/snooze, FALSE means display. -- 2.25.1