Index: branches/wmf/1.17wmf1/includes/Message.php |
— | — | @@ -285,6 +285,15 @@ |
286 | 286 | public function exists() { |
287 | 287 | return $this->fetchMessage() !== false; |
288 | 288 | } |
| 289 | + |
| 290 | + /** |
| 291 | + * Check whether a message does not exist, is an empty string, or is "-" |
| 292 | + * @return Bool: true if is is and false if not |
| 293 | + */ |
| 294 | + public function isDisabled() { |
| 295 | + $message = $this->fetchMessage(); |
| 296 | + return $message === false || $message === '' || $message === '-'; |
| 297 | + } |
289 | 298 | |
290 | 299 | public static function rawParam( $value ) { |
291 | 300 | return array( 'raw' => $value ); |