Merge "SkinTemplate: Move bottomScripts() back sightly"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 16 Aug 2016 23:24:05 +0000 (23:24 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 16 Aug 2016 23:24:05 +0000 (23:24 +0000)
includes/skins/SkinTemplate.php

index 749a686..b4be461 100644 (file)
@@ -478,6 +478,9 @@ class SkinTemplate extends Skin {
                $tpl->set( 'sidebar', $this->buildSidebar() );
                $tpl->set( 'nav_urls', $this->buildNavUrls() );
 
+               // Do this last in case hooks above add bottom scripts
+               $tpl->set( 'bottomscripts', $this->bottomScripts() );
+
                // Set the head scripts near the end, in case the above actions resulted in added scripts
                $tpl->set( 'headelement', $out->headElement( $this ) );
 
@@ -508,9 +511,6 @@ class SkinTemplate extends Skin {
                // See Skin::afterContentHook() for further documentation.
                $tpl->set( 'dataAfterContent', $this->afterContentHook() );
 
-               // Do this last in case hooks above add bottom scripts
-               $tpl->set( 'bottomscripts', $this->bottomScripts() );
-
                return $tpl;
        }