X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkinTemplate.php;h=cefc5bcd5c5076a1ede8fbb5b91c674c3ec6dbd4;hb=010410265a5505b44a273bb119d8fac7f1fa7739;hp=2d1679d3cedf31f6150b16e05032f944c6c45e79;hpb=b5906606e1aa1a795231fb813b766818b1dd6c25;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php index 2d1679d3ce..cefc5bcd5c 100644 --- a/includes/skins/SkinTemplate.php +++ b/includes/skins/SkinTemplate.php @@ -260,6 +260,7 @@ class SkinTemplate extends Skin { * Wrap the body text with language information and identifiable element * * @param Title $title + * @param string $html body text * @return string html */ protected function wrapHTML( $title, $html ) { @@ -662,27 +663,38 @@ class SkinTemplate extends Skin { $loginlink = $this->getUser()->isAllowed( 'createaccount' ) && $useCombinedLoginLink ? 'nav-login-createaccount' : 'pt-login'; - $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, - ]; + // 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' ), + ]; + } // No need to show Talk and Contributions to anons if they can't contribute! if ( User::groupHasPermission( '*', 'edit' ) ) { - // Show the text "Not logged in" - $personal_urls['anonuserpage'] = [ - 'text' => $this->msg( 'notloggedin' )->text() - ]; - // Because of caching, we can't link directly to the IP talk and // contributions pages. Instead we use the special page shortcuts // (which work correctly regardless of caching). This means we can't