r97729 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97728‎ | r97729 | r97730 >
Date:13:25, 21 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Copy Message::isDisabled() from trunk, Babel needs it
Modified paths:
  • /branches/wmf/1.17wmf1/includes/Message.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/Message.php
@@ -285,6 +285,15 @@
286286 public function exists() {
287287 return $this->fetchMessage() !== false;
288288 }
 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+ }
289298
290299 public static function rawParam( $value ) {
291300 return array( 'raw' => $value );

Status & tagging log