X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FParserOutput.php;h=7068bd717e6bdb20c5095947780f674bd8e73b4f;hb=31dbc1ee2b0c32757dfaabc206e923662d233d2c;hp=65b527c8a868e3c120d9a15a098991ef7a1e46f2;hpb=8b1a78fa5e62923d6dea1f9fe578c46b2910155e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 65b527c8a8..7068bd717e 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -41,7 +41,6 @@ class ParserOutput extends CacheTime { $mModules = array(), # Modules to be loaded by the resource loader $mModuleScripts = array(), # Modules of which only the JS will be loaded by the resource loader $mModuleStyles = array(), # Modules of which only the CSSS will be loaded by the resource loader - $mModuleMessages = array(), # Modules of which only the messages will be loaded by the resource loader $mJsConfigVars = array(), # JavaScript config variable for mw.config combined with this page $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks $mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only @@ -104,7 +103,7 @@ class ParserOutput extends CacheTime { $text = str_replace( array( Parser::TOC_START, Parser::TOC_END ), '', $text ); } else { $text = preg_replace( - '#' . preg_quote( Parser::TOC_START ) . '.*?' . preg_quote( Parser::TOC_END ) . '#s', + '#' . preg_quote( Parser::TOC_START, '#' ) . '.*?' . preg_quote( Parser::TOC_END, '#' ) . '#s', '', $text ); @@ -191,8 +190,13 @@ class ParserOutput extends CacheTime { return $this->mModuleStyles; } + /** + * @deprecated since 1.26 Obsolete + * @return array + */ public function getModuleMessages() { - return $this->mModuleMessages; + wfDeprecated( __METHOD__, '1.26' ); + return array(); } /** @since 1.23 */ @@ -445,8 +449,12 @@ class ParserOutput extends CacheTime { $this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules ); } + /** + * @deprecated since 1.26 Use addModules() instead + * @param string|array $modules + */ public function addModuleMessages( $modules ) { - $this->mModuleMessages = array_merge( $this->mModuleMessages, (array)$modules ); + wfDeprecated( __METHOD__, '1.26' ); } /** @@ -476,7 +484,6 @@ class ParserOutput extends CacheTime { $this->addModules( $out->getModules() ); $this->addModuleScripts( $out->getModuleScripts() ); $this->addModuleStyles( $out->getModuleStyles() ); - $this->addModuleMessages( $out->getModuleMessages() ); $this->addJsConfigVars( $out->getJsConfigVars() ); $this->mHeadItems = array_merge( $this->mHeadItems, $out->getHeadItemsArray() );