X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=9b7d9a06422ae5881ff013eb0ff12797ff6cfeba;hb=f17c29762468ec194476d1399339c3ff59f2e786;hp=06954430fde9d91a205fe52740c7d08c69b2dccc;hpb=27a74895d8ffce6a1c15df3ed1f234b9fd10a048;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 06954430fd..9b7d9a0642 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -152,9 +152,6 @@ class OutputPage extends ContextSource { /** @var array */ protected $mModules = []; - /** @var array */ - protected $mModuleScripts = []; - /** @var array */ protected $mModuleStyles = []; @@ -552,30 +549,12 @@ class OutputPage extends ContextSource { } /** - * Get the list of script-only modules to load on this page. - * - * @param bool $filter - * @param string|null $position Unused - * @return array Array of module names - */ - public function getModuleScripts( $filter = false, $position = null ) { - return $this->getModules( $filter, null, 'mModuleScripts', - ResourceLoaderModule::TYPE_SCRIPTS - ); - } - - /** - * Load the scripts of one or more ResourceLoader modules, on this page. - * - * This method exists purely to provide the legacy behaviour of loading - * a module's scripts in the global scope, and without dependency resolution. - * See . - * - * @deprecated since 1.31 Use addModules() instead. - * @param string|array $modules Module name (string) or array of module names + * @deprecated since 1.33 Use getModules() instead. + * @return array */ - public function addModuleScripts( $modules ) { - $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules ); + public function getModuleScripts() { + wfDeprecated( __METHOD__, '1.33' ); + return []; } /** @@ -1972,7 +1951,6 @@ class OutputPage extends ContextSource { $this->mNoGallery = $parserOutput->getNoGallery(); $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() ); $this->addModules( $parserOutput->getModules() ); - $this->addModuleScripts( $parserOutput->getModuleScripts() ); $this->addModuleStyles( $parserOutput->getModuleStyles() ); $this->addJsConfigVars( $parserOutput->getJsConfigVars() ); $this->mPreventClickjacking = $this->mPreventClickjacking @@ -2039,7 +2017,6 @@ class OutputPage extends ContextSource { $this->addParserOutputText( $parserOutput, $poOptions ); $this->addModules( $parserOutput->getModules() ); - $this->addModuleScripts( $parserOutput->getModuleScripts() ); $this->addModuleStyles( $parserOutput->getModuleStyles() ); $this->addJsConfigVars( $parserOutput->getJsConfigVars() ); @@ -3185,7 +3162,6 @@ class OutputPage extends ContextSource { $rlClient->setConfig( $this->getJSVars() ); $rlClient->setModules( $this->getModules( /*filter*/ true ) ); $rlClient->setModuleStyles( $moduleStyles ); - $rlClient->setModuleScripts( $this->getModuleScripts( /*filter*/ true ) ); $rlClient->setExemptStates( $exemptStates ); $this->rlClient = $rlClient; }