From: Tim Starling Date: Tue, 10 Jun 2008 15:38:13 +0000 (+0000) Subject: Forgot this, needed with r36153 X-Git-Tag: 1.31.0-rc.0~47065 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/%27%241//%27%40script%40/%27?a=commitdiff_plain;h=bf51f6bb4be301184e9718ea5f8be0b5871adf28;p=lhc%2Fweb%2Fwiklou.git Forgot this, needed with r36153 --- 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; + } }