From: Andrew Hunt Date: Sat, 14 Nov 2015 22:18:42 +0000 (-0500) Subject: CRM-17575 System Check - stop alert for hushed messages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=00eef6838b720e1f70fbfc55991a9166e6060524;p=civicrm-core.git CRM-17575 System Check - stop alert for hushed messages ---------------------------------------- * CRM-17575: Hidden alerts still pop up https://issues.civicrm.org/jira/browse/CRM-17575 --- 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.