r12502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12501‎ | r12502 | r12503 >
Date:05:35, 8 January 2006
Author:avar
Status:old
Tags:
Comment:
* Add a getRegexCase() accessor for getting i or nothing depending on the
case-insensitiveness of the thing, only needed with getBaseRegex() since that
won't include it automatically..
Modified paths:
  • /trunk/phase3/includes/MagicWord.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MagicWord.php
@@ -199,6 +199,18 @@
200200 }
201201
202202 /**
 203+ * Gets the regexp case modifier to use, i.e. i or nothing, to be used if
 204+ * one is using MagicWord::getBaseRegex(), otherwise it'll be included in
 205+ * the complete expression
 206+ */
 207+ function getRegexCase() {
 208+ if ( $this->mRegex === '' )
 209+ $this->initRegex();
 210+
 211+ return $this->mCaseSensitive ? '' : 'i';
 212+ }
 213+
 214+ /**
203215 * Gets a regex matching the word, if it is at the string start
204216 */
205217 function getRegexStart() {

Status & tagging log