Merge "Hard-deprecate ParserOutput stateful transform methods"
[lhc/web/wiklou.git] / includes / OutputPage.php
index d210da4..f95327a 100644 (file)
@@ -488,7 +488,7 @@ class OutputPage extends ContextSource {
         * Filter an array of modules to remove insufficiently trustworthy members, and modules
         * which are no longer registered (eg a page is cached before an extension is disabled)
         * @param array $modules
-        * @param string|null $position If not null, only return modules with this position
+        * @param string|null $position Unused
         * @param string $type
         * @return array
         */
@@ -501,7 +501,6 @@ class OutputPage extends ContextSource {
                        $module = $resourceLoader->getModule( $val );
                        if ( $module instanceof ResourceLoaderModule
                                && $module->getOrigin() <= $this->getAllowedModules( $type )
-                               && ( is_null( $position ) || $module->getPosition() == $position )
                        ) {
                                if ( $this->mTarget && !in_array( $this->mTarget, $module->getTargets() ) ) {
                                        $this->warnModuleTargetFilter( $module->getName() );
@@ -532,7 +531,7 @@ class OutputPage extends ContextSource {
         * Get the list of modules to include on this page
         *
         * @param bool $filter Whether to filter out insufficiently trustworthy modules
-        * @param string|null $position If not null, only return modules with this position
+        * @param string|null $position Unused
         * @param string $param
         * @param string $type
         * @return array Array of module names
@@ -542,7 +541,7 @@ class OutputPage extends ContextSource {
        ) {
                $modules = array_values( array_unique( $this->$param ) );
                return $filter
-                       ? $this->filterModules( $modules, $position, $type )
+                       ? $this->filterModules( $modules, null, $type )
                        : $modules;
        }
 
@@ -561,11 +560,11 @@ class OutputPage extends ContextSource {
         * Get the list of module JS to include on this page
         *
         * @param bool $filter
-        * @param string|null $position
+        * @param string|null $position Unused
         * @return array Array of module names
         */
        public function getModuleScripts( $filter = false, $position = null ) {
-               return $this->getModules( $filter, $position, 'mModuleScripts',
+               return $this->getModules( $filter, null, 'mModuleScripts',
                        ResourceLoaderModule::TYPE_SCRIPTS
                );
        }
@@ -585,11 +584,11 @@ class OutputPage extends ContextSource {
         * Get the list of module CSS to include on this page
         *
         * @param bool $filter
-        * @param string|null $position
+        * @param string|null $position Unused
         * @return array Array of module names
         */
        public function getModuleStyles( $filter = false, $position = null ) {
-               return $this->getModules( $filter, $position, 'mModuleStyles',
+               return $this->getModules( $filter, null, 'mModuleStyles',
                        ResourceLoaderModule::TYPE_STYLES
                );
        }
@@ -2958,8 +2957,8 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * JS stuff to put at the bottom of the `<body>`. These are modules with position 'bottom',
-        * legacy scripts ($this->mScripts), and user JS.
+        * JS stuff to put at the bottom of the `<body>`.
+        * These are legacy scripts ($this->mScripts), and user JS.
         *
         * @return string|WrappedStringList HTML
         */