Index: trunk/phase3/includes/Status.php |
— | — | @@ -179,4 +179,16 @@ |
180 | 180 | } |
181 | 181 | return $result; |
182 | 182 | } |
| 183 | + |
| 184 | + /** |
| 185 | + * Returns true if the specified message is present as a warning or error |
| 186 | + */ |
| 187 | + function hasMessage( $msg ) { |
| 188 | + foreach ( $this->errors as $error ) { |
| 189 | + if ( $error['message'] === $msg ) { |
| 190 | + return true; |
| 191 | + } |
| 192 | + } |
| 193 | + return false; |
| 194 | + } |
183 | 195 | } |