X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMagicWord.php;h=6e7799a308cbd08faa61a5b79a87939dfc4d218a;hb=4bff74eac284f151e22008689915674d0932a48b;hp=e70b8cec5cc270babe3e9d65d8c9151c5cfb1a54;hpb=15b3664ee12ac94a92d1057dab5645370276d027;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWord.php b/includes/MagicWord.php index e70b8cec5c..6e7799a308 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -646,33 +646,6 @@ class MagicWord { return $this->mModified; } - /** - * $magicarr is an associative array of (magic word ID => replacement) - * 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. - * @deprecated since 1.25, unused - * - * @param array $magicarr - * @param string $subject - * @param string &$result - * - * @return bool - */ - public function replaceMultiple( $magicarr, $subject, &$result ) { - wfDeprecated( __METHOD__, '1.25' ); - $search = []; - $replace = []; - foreach ( $magicarr as $id => $replacement ) { - $mw = self::get( $id ); - $search[] = $mw->getRegex(); - $replace[] = $replacement; - } - - $result = preg_replace( $search, $replace, $subject ); - return $result !== $subject; - } - /** * Adds all the synonyms of this MagicWord to an array, to allow quick * lookup in a list of magic words