From: Jon goldberg Date: Wed, 8 Jul 2015 16:08:51 +0000 (-0400) Subject: CRM-13823 - CRM Core - remove incorrect calls to severityMap() X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4f2714affd0d2c756ba9153fe4778bc99050d1f8;p=civicrm-core.git CRM-13823 - CRM Core - remove incorrect calls to severityMap() --- diff --git a/CRM/Utils/Check.php b/CRM/Utils/Check.php index 47ab63200d..cd2e18d607 100644 --- a/CRM/Utils/Check.php +++ b/CRM/Utils/Check.php @@ -83,10 +83,9 @@ class CRM_Utils_Check { } $statusMessages = array(); $statusType = 'alert'; - foreach ($messages as $message) { - if ($filter === TRUE || call_user_func($filter, $message->getSeverity()) >= 3) { - $statusType = (call_user_func($filter, $message->getSeverity()) >= 4) ? 'error' : $statusType; + if ($filter === TRUE || $message->getSeverity() >= 3) { + $statusType = $message->getSeverity() >= 4 ? 'error' : $statusType; $statusMessage = $message->getMessage(); $statusMessages[] = $statusTitle = $message->getTitle(); } @@ -118,7 +117,8 @@ class CRM_Utils_Check { if ($aSeverity == $bSeverity) { return strcmp($a->getName(), $b->getName()); } - return (self::severityMap($aSeverity) < self::severityMap($bSeverity)); + // The Message constructor guarantees that these will always be integers. + return ($aSeverity < $bSeverity); } /** @@ -215,7 +215,6 @@ class CRM_Utils_Check { } } } - uasort($messages, array(__CLASS__, 'severitySort')); return $messages;