Merge "Change "permissions errors" message to "permission error""
[lhc/web/wiklou.git] / includes / MagicWord.php
index 18b79c4..adb2ab7 100644 (file)
@@ -138,6 +138,8 @@ class MagicWord {
                'numberofactiveusers',
                'numberofpages',
                'currentversion',
+               'rootpagename',
+               'rootpagenamee',
                'basepagename',
                'basepagenamee',
                'currenttimestamp',
@@ -308,10 +310,9 @@ class MagicWord {
                $this->mId = $id;
                $wgContLang->getMagic( $this );
                if ( !$this->mSynonyms ) {
-                       $this->mSynonyms = array( 'dkjsagfjsgashfajsh' );
+                       $this->mSynonyms = array( 'brionmademeputthishere' );
                        wfProfileOut( __METHOD__ );
                        throw new MWException( "Error: invalid magic word '$id'" );
-                       #wfDebugLog( 'exception', "Error: invalid magic word '$id'\n" );
                }
                wfProfileOut( __METHOD__ );
        }
@@ -512,7 +513,7 @@ class MagicWord {
         */
        function replace( $replacement, $subject, $limit = -1 ) {
                $res = preg_replace( $this->getRegex(), StringUtils::escapeRegexReplacement( $replacement ), $subject, $limit );
-               $this->mModified = !($res === $subject);
+               $this->mModified = $res !== $subject;
                return $res;
        }
 
@@ -528,7 +529,7 @@ class MagicWord {
         */
        function substituteCallback( $text, $callback ) {
                $res = preg_replace_callback( $this->getVariableRegex(), $callback, $text );
-               $this->mModified = !($res === $text);
+               $this->mModified = $res !== $text;
                return $res;
        }
 
@@ -607,7 +608,7 @@ class MagicWord {
                }
 
                $result = preg_replace( $search, $replace, $subject );
-               return !($result === $subject);
+               return $result !== $subject;
        }
 
        /**