X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMagicWord.php;h=adb2ab77471941da3ab2bbcdbe21cb400377a90a;hb=ca7940324596c3ab336030de462342b635e2dfca;hp=f9457c3bdc1237dea6a0ca0519e5006b885cdd44;hpb=760b1e8c3baa03f27900d227faba53842524023f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWord.php b/includes/MagicWord.php index f9457c3bdc..adb2ab7747 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -310,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__ ); } @@ -514,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; } @@ -530,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; } @@ -609,7 +608,7 @@ class MagicWord { } $result = preg_replace( $search, $replace, $subject ); - return !($result === $subject); + return $result !== $subject; } /**