public function getLanguages() {
global $wgHideInterlanguageLinks;
$out = $this->getOutput();
+ $userLang = $this->getLanguage();
# Language links
$language_urls = array();
$ilLangName = $this->formatLanguageName( $ilLangName );
}
+ // CLDR extension or similar is required to localize the language name;
+ // otherwise we'll end up with the autonym again.
+ $ilLangLocalName = Language::fetchLanguageName( $ilInterwikiCode, $userLang->getCode() );
+
$language_urls[] = array(
'href' => $languageLinkTitle->getFullURL(),
'text' => $ilLangName,
- 'title' => $languageLinkTitle->getText(),
+ 'title' => wfMessage( 'tooltip-iwiki', $languageLinkTitle->getText(), $ilLangLocalName )->escaped(),
'class' => $class,
'lang' => wfBCP47( $ilInterwikiCode ),
'hreflang' => wfBCP47( $ilInterwikiCode ),
if ( $out->isSyndicated() ) {
$feeds = array();
foreach ( $out->getSyndicationLinks() as $format => $link ) {
- // Give grep a chance to find the usages: feed-atom, feed-rss
$feeds[$format] = array(
+ // Messages: feed-atom, feed-rss
'text' => $this->msg( "feed-$format" )->text(),
'href' => $link
);
* @return array
*/
protected function buildPersonalUrls() {
- global $wgSecureLogin;
-
$title = $this->getTitle();
$request = $this->getRequest();
$pageurl = $title->getLocalURL();
}
}
- if ( $wgSecureLogin && $request->detectProtocol() === 'https' ) {
- $a['wpStickHTTPS'] = true;
- }
-
$returnto = wfArrayToCgi( $a );
if ( $this->loggedin ) {
$personal_urls['userpage'] = array(
: 'login';
$is_signup = $request->getText( 'type' ) == 'signup';
- # anonlogin & login are the same
- $proto = $wgSecureLogin ? PROTO_HTTPS : null;
-
$login_id = $this->showIPinHeader() ? 'anonlogin' : 'login';
$login_url = array(
'text' => $this->msg( $loginlink )->text(),
- 'href' => self::makeSpecialUrl( 'Userlogin', $returnto, $proto ),
+ 'href' => self::makeSpecialUrl( 'Userlogin', $returnto ),
'active' => $title->isSpecial( 'Userlogin' ) && ( $loginlink == 'nav-login-createaccount' || !$is_signup ),
);
$createaccount_url = array(
'text' => $this->msg( 'createaccount' )->text(),
- 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup", $proto ),
+ 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup" ),
'active' => $title->isSpecial( 'Userlogin' ) && $is_signup,
);
);
}
- $sur = new UserrightsPage;
- $sur->setContext( $this->getContext() );
- if ( $sur->userCanExecute( $this->getUser() ) ) {
- $nav_urls['userrights'] = array(
- 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
- );
+ if ( !$user->isAnon() ) {
+ $sur = new UserrightsPage;
+ $sur->setContext( $this->getContext() );
+ if ( $sur->userCanExecute( $this->getUser() ) ) {
+ $nav_urls['userrights'] = array(
+ 'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
+ );
+ }
}
}
function getNameSpaceKey() {
return $this->getTitle()->getNamespaceKey();
}
-
- public function commonPrintStylesheet() {
- return false;
- }
}
/**