Merge "Move bottomScripts() call in SkinTemplate"
[lhc/web/wiklou.git] / includes / skins / SkinTemplate.php
index 22413b9..749a686 100644 (file)
@@ -456,7 +456,6 @@ class SkinTemplate extends Skin {
                $tpl->set( 'indicators', $out->getIndicators() );
 
                $tpl->set( 'sitenotice', $this->getSiteNotice() );
-               $tpl->set( 'bottomscripts', $this->bottomScripts() );
                $tpl->set( 'printfooter', $this->printSource() );
                // Wrap the bodyText with #mw-content-text element
                $out->mBodytext = $this->wrapHTML( $title, $out->mBodytext );
@@ -509,6 +508,9 @@ 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;
        }