global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
global $wgUseTrackbacks, $wgUseSiteJs;
- global $wgArticlePath, $wgScriptPath, $wgServer, $wgLang, $wgCanonicalNamespaceNames;
+ global $wgArticlePath, $wgScriptPath, $wgServer, $wgCanonicalNamespaceNames;
wfProfileIn( __METHOD__ );
$tpl->setRef( 'userpage', $this->userpage );
$tpl->setRef( 'userpageurl', $this->userpageUrlDetails['href'] );
$tpl->set( 'userlang', $wgLang->getCode() );
+ $tpl->set( 'userlangattributes', 'lang="' . $wgLang->getCode() . '" xml:lang="' . $wgLang->getCode() . '"' );
$tpl->set( 'pagecss', $this->setupPageCss() );
$tpl->setRef( 'usercss', $this->usercss );
$tpl->setRef( 'userjs', $this->userjs );
# from request values or be specified in "sub page" form. The plot
# thickens, because $wgTitle is altered for special pages, so doesn't
# contain the original alias-with-subpage.
- $title = Title::newFromText( $wgRequest->getText( 'title' ) );
- if( $title instanceof Title && $title->getNamespace() == NS_SPECIAL ) {
+ $origTitle = Title::newFromText( $wgRequest->getText( 'title' ) );
+ if( $origTitle instanceof Title && $origTitle->getNamespace() == NS_SPECIAL ) {
list( $spName, $spPar ) =
- SpecialPage::resolveAliasWithSubpage( $title->getText() );
+ SpecialPage::resolveAliasWithSubpage( $origTitle->getText() );
$active = $spName == 'Contributions'
&& ( ( $spPar && $spPar == $this->username )
|| $wgRequest->getText( 'target' ) == $this->username );
$nav_urls = array();
$nav_urls['mainpage'] = array( 'href' => self::makeMainPageUrl() );
- if( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
- if( $wgUploadNavigationUrl ) {
- $nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl );
- } else {
- $nav_urls['upload'] = array( 'href' => self::makeSpecialUrl( 'Upload' ) );
- }
+ if( $wgUploadNavigationUrl ) {
+ $nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl );
+ } elseif( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
+ $nav_urls['upload'] = array( 'href' => self::makeSpecialUrl( 'Upload' ) );
} else {
- if( $wgUploadNavigationUrl )
- $nav_urls['upload'] = array( 'href' => $wgUploadNavigationUrl );
- else
- $nav_urls['upload'] = false;
+ $nav_urls['upload'] = false;
}
$nav_urls['specialpages'] = array( 'href' => self::makeSpecialUrl( 'Specialpages' ) );