global $wgDisableCounters, $wgSitename, $wgLogo, $wgHideInterlanguageLinks;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
- global $wgDebugComments;
global $wgArticlePath, $wgScriptPath, $wgServer;
wfProfileIn( __METHOD__ );
}
}
- if ( $wgDebugComments ) {
- $tpl->setRef( 'debug', $out->mDebugtext );
- } else {
- $tpl->set( 'debug', '' );
- }
-
$tpl->set( 'sitenotice', $this->getSiteNotice() );
$tpl->set( 'bottomscripts', $this->bottomScripts() );
$tpl->set( 'printfooter', $this->printSource() );
if ( !in_array( $title->getNamespace(), array( NS_SPECIAL, NS_FILE ) ) &&
in_array( $request->getVal( 'action', 'view' ), array( 'view', 'historysubmit' ) ) &&
( $title->exists() || $title->getNamespace() == NS_MEDIAWIKI ) ) {
- $pageLang = $title->getPageLanguage();
+ $pageLang = $title->getPageViewLanguage();
$realBodyAttribs['lang'] = $pageLang->getHtmlCode();
$realBodyAttribs['dir'] = $pageLang->getDir();
$realBodyAttribs['class'] = 'mw-content-'.$pageLang->getDir();
$tpl->set( 'headscripts', $out->getHeadScripts() . $out->getHeadItems() );
}
+ $tpl->set( 'debug', '' );
$tpl->set( 'debughtml', $this->generateDebugHTML() );
$tpl->set( 'reporttime', wfReportTime() );
global $wgSecureLogin;
$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 ),
'class' => $wgSecureLogin ? 'link-https' : ''
);
- if ( $this->getUser()->isAllowed( 'createaccount' ) && !$useCombinedLoginLink ) {
- $personal_urls['createaccount'] = $createaccount_url;
- }
-
if( $this->showIPinHeader() ) {
$href = &$this->userpageUrlDetails['href'];
$personal_urls['anonuserpage'] = array(
'class' => $usertalkUrlDetails['exists'] ? false : 'new',
'active' => ( $pageurl == $href )
);
- $personal_urls['anonlogin'] = $login_url;
- } else {
- $personal_urls['login'] = $login_url;
}
+
+ if ( $this->getUser()->isAllowed( 'createaccount' ) && !$useCombinedLoginLink ) {
+ $personal_urls['createaccount'] = $createaccount_url;
+ }
+
+ $personal_urls[$login_id] = $login_url;
}
wfRunHooks( 'PersonalUrls', array( &$personal_urls, &$title ) );
'href' => self::makeSpecialUrlSubpage( 'Contributions', $rootUser )
);
- $logPage = SpecialPage::getTitleFor( 'Log' );
$nav_urls['log'] = array(
- 'href' => $logPage->getLocalUrl( array( 'user' => $rootUser ) )
+ 'href' => self::makeSpecialUrlSubpage( 'Log', $rootUser )
);
if ( $this->getUser()->isAllowed( 'block' ) ) {
function printTrail() { ?>
<?php $this->html( 'bottomscripts' ); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html( 'reporttime' ) ?>
-<?php if ( $this->data['debug'] ): ?>
-<!-- Debug output:
-<?php $this->text( 'debug' ); ?>
-
--->
-<?php endif;
+<?php echo MWDebug::getDebugHTML( $this->getSkin()->getContext() );
}
}
-