X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkinTemplate.php;h=b4be46194960b3ee6accc91faa93413382521d68;hb=fe79bc528b0e054aa630bd4fcfcdd4a9804892da;hp=69e2e8b2b1520b8e38601a97f59100125dadab6a;hpb=b09579143853bc8d14bb3fd828df50a7df98cf5a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 69e2e8b2b1..b4be461949 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -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 ); @@ -479,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 ) ); @@ -665,34 +667,17 @@ class SkinTemplate extends Skin { ? 'nav-login-createaccount' : 'pt-login'; - // TODO remove this after AuthManager is stable - global $wgDisableAuthManager; - if ( $wgDisableAuthManager ) { - $is_signup = $request->getText( 'type' ) == 'signup'; - $login_url = [ - 'text' => $this->msg( $loginlink )->text(), - 'href' => self::makeSpecialUrl( 'Userlogin', $returnto ), - 'active' => $title->isSpecial( 'Userlogin' ) - && ( $loginlink == 'nav-login-createaccount' || !$is_signup ), - ]; - $createaccount_url = [ - 'text' => $this->msg( 'pt-createaccount' )->text(), - 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup" ), - 'active' => $title->isSpecial( 'Userlogin' ) && $is_signup, - ]; - } else { - $login_url = [ - 'text' => $this->msg( $loginlink )->text(), - 'href' => self::makeSpecialUrl( 'Userlogin', $returnto ), - 'active' => $title->isSpecial( 'Userlogin' ) || - $title->isSpecial( 'CreateAccount' ) && $useCombinedLoginLink, - ]; - $createaccount_url = [ - 'text' => $this->msg( 'pt-createaccount' )->text(), - 'href' => self::makeSpecialUrl( 'CreateAccount', $returnto ), - 'active' => $title->isSpecial( 'CreateAccount' ), - ]; - } + $login_url = [ + 'text' => $this->msg( $loginlink )->text(), + 'href' => self::makeSpecialUrl( 'Userlogin', $returnto ), + 'active' => $title->isSpecial( 'Userlogin' ) + || $title->isSpecial( 'CreateAccount' ) && $useCombinedLoginLink, + ]; + $createaccount_url = [ + 'text' => $this->msg( 'pt-createaccount' )->text(), + 'href' => self::makeSpecialUrl( 'CreateAccount', $returnto ), + 'active' => $title->isSpecial( 'CreateAccount' ), + ]; // No need to show Talk and Contributions to anons if they can't contribute! if ( User::groupHasPermission( '*', 'edit' ) ) {