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 ),
);
}
- $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 )
+ );
+ }
}
}
* on the link) is present it will be used to generate a tooltip and
* accesskey for the link.
*
+ * The keys "context" and "primary" are ignored; these keys are used
+ * internally by skins and are not supposed to be included in the HTML
+ * output.
+ *
* If you don't want an accesskey, set $item['tooltiponly'] = true;
*
* @param array $options can be used to affect the output of a link.
if ( isset( $item['href'] ) || isset( $options['link-fallback'] ) ) {
$attrs = $item;
- foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly' ) as $k ) {
+ foreach ( array( 'single-id', 'text', 'msg', 'tooltiponly', 'context', 'primary' ) as $k ) {
unset( $attrs[$k] );
}
* body and html tags.
*/
function printTrail() { ?>
+<?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() ); ?>
<?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html( 'reporttime' ) ?>
-<?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() );
+<?php
}
}