Avoid instantiating ResourceLoader modules twice
authorOri Livneh <ori@wikimedia.org>
Wed, 6 Mar 2013 00:24:57 +0000 (16:24 -0800)
committerOri Livneh <ori@wikimedia.org>
Wed, 6 Mar 2013 00:24:57 +0000 (16:24 -0800)
Commit 13169c88 seperated out the call to getModule from the assignment to the
$modules array in order to add a check for private modules, so they can be
filtered out (see bug 34907). This had the (presumably unintended) side-effect
of causing modules to be instantiated twice.

Change-Id: Iccd7f3d3d473c5a43107842ed4e1cf08857a3886

includes/resourceloader/ResourceLoader.php

index 5abe226..52f2009 100644 (file)
@@ -451,7 +451,7 @@ class ResourceLoader {
                                        $this->hasErrors = true;
                                        continue;
                                }
-                               $modules[$name] = $this->getModule( $name );
+                               $modules[$name] = $module;
                        } else {
                                $missing[] = $name;
                        }