X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FMagicWord.php;h=186821de394fd23458fe050c6589e6d94c95f037;hb=b4255eab0bad160586994bd6c32b018aaabf739e;hp=d28155529652c5d6ac96404851177273b9ecf6be;hpb=bc2a7ba5df27660543a2948f3729d9cc2bd544c5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWord.php b/includes/MagicWord.php index d281555296..186821de39 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -273,7 +273,7 @@ class MagicWord { static function getVariableIDs() { if ( !self::$mVariableIDsInitialised ) { # Get variable IDs - wfRunHooks( 'MagicWordwgVariableIDs', array( &self::$mVariableIDs ) ); + Hooks::run( 'MagicWordwgVariableIDs', array( &self::$mVariableIDs ) ); self::$mVariableIDsInitialised = true; } return self::$mVariableIDs; @@ -308,7 +308,7 @@ class MagicWord { */ static function getDoubleUnderscoreArray() { if ( is_null( self::$mDoubleUnderscoreArray ) ) { - wfRunHooks( 'GetDoubleUnderscoreIDs', array( &self::$mDoubleUnderscoreIDs ) ); + Hooks::run( 'GetDoubleUnderscoreIDs', array( &self::$mDoubleUnderscoreIDs ) ); self::$mDoubleUnderscoreArray = new MagicWordArray( self::$mDoubleUnderscoreIDs ); } return self::$mDoubleUnderscoreArray; @@ -330,15 +330,12 @@ class MagicWord { */ function load( $id ) { global $wgContLang; - wfProfileIn( __METHOD__ ); $this->mId = $id; $wgContLang->getMagic( $this ); if ( !$this->mSynonyms ) { $this->mSynonyms = array( 'brionmademeputthishere' ); - wfProfileOut( __METHOD__ ); throw new MWException( "Error: invalid magic word '$id'" ); } - wfProfileOut( __METHOD__ ); } /** @@ -655,7 +652,7 @@ class MagicWord { * This method uses the php feature to do several replacements at the same time, * thereby gaining some efficiency. The result is placed in the out variable * $result. The return value is true if something was replaced. - * @todo Should this be static? It doesn't seem to be used at all + * @deprecated since 1.25, unused * * @param array $magicarr * @param string $subject @@ -664,6 +661,7 @@ class MagicWord { * @return bool */ function replaceMultiple( $magicarr, $subject, &$result ) { + wfDeprecated( __METHOD__, '1.25' ); $search = array(); $replace = array(); foreach ( $magicarr as $id => $replacement ) {