r98726 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98725‎ | r98726 | r98727 >
Date:22:07, 2 October 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Add isBlank() from trunk
Modified paths:
  • /branches/wmf/1.17wmf1/includes/Message.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/Message.php
@@ -285,6 +285,16 @@
286286 public function exists() {
287287 return $this->fetchMessage() !== false;
288288 }
 289+
 290+ /**
 291+ * Check whether a message does not exist, or is an empty string
 292+ * @return Bool: true if is is and false if not
 293+ * @todo FIXME: Merge with isDisabled()?
 294+ */
 295+ public function isBlank() {
 296+ $message = $this->fetchMessage();
 297+ return $message === false || $message === '';
 298+ }
289299
290300 /**
291301 * Check whether a message does not exist, is an empty string, or is "-"

Status & tagging log