From bf51f6bb4be301184e9718ea5f8be0b5871adf28 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 10 Jun 2008 15:38:13 +0000 Subject: [PATCH] Forgot this, needed with r36153 --- includes/Status.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/Status.php b/includes/Status.php index ed1455ca48..185ea6e5d7 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -179,4 +179,16 @@ class Status { } return $result; } + + /** + * Returns true if the specified message is present as a warning or error + */ + function hasMessage( $msg ) { + foreach ( $this->errors as $error ) { + if ( $error['message'] === $msg ) { + return true; + } + } + return false; + } } -- 2.20.1