// Hack for i18n:attributes in PHPTAL 1.0.0 dev version as of 2004-10-23
$value = preg_replace( '/^string:/', '', $value );
- $value = wfMsg( $value );
+ $value = wfMessage( $value )->text();
// interpolate variables
$m = array();
while( preg_match( '/\$([0-9]*?)/sm', $value, $m ) ) {
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() );
$tpl->set( 'headscripts', $out->getHeadScripts() . $out->getHeadItems() );
}
+ $tpl->set( 'debug', '' );
$tpl->set( 'debughtml', $this->generateDebugHTML() );
$tpl->set( 'reporttime', wfReportTime() );
'text' => $this->username,
'href' => &$this->userpageUrlDetails['href'],
'class' => $this->userpageUrlDetails['exists'] ? false : 'new',
- 'active' => ( $this->userpageUrlDetails['href'] == $pageurl )
+ 'active' => ( $this->userpageUrlDetails['href'] == $pageurl ),
+ 'dir' => 'auto'
);
$usertalkUrlDetails = $this->makeTalkUrlDetails( $this->userpage );
$personal_urls['mytalk'] = array(
$is_signup = $request->getText( 'type' ) == 'signup';
# anonlogin & login are the same
+ 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 ),
- 'active' => $title->isSpecial( 'Userlogin' ) && ( $loginlink == 'nav-login-createaccount' || !$is_signup )
+ 'href' => self::makeSpecialUrl( 'Userlogin', $returnto, $proto ),
+ 'active' => $title->isSpecial( 'Userlogin' ) && ( $loginlink == 'nav-login-createaccount' || !$is_signup ),
+ 'class' => $wgSecureLogin ? 'link-https' : ''
+ );
+ $createaccount_url = array(
+ 'text' => $this->msg( 'createaccount' )->text(),
+ 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup", $proto ),
+ 'active' => $title->isSpecial( 'Userlogin' ) && $is_signup,
+ 'class' => $wgSecureLogin ? 'link-https' : ''
);
- if ( $this->getUser()->isAllowed( 'createaccount' ) && !$useCombinedLoginLink ) {
- $createaccount_url = array(
- 'text' => $this->msg( 'createaccount' )->text(),
- 'href' => self::makeSpecialUrl( 'Userlogin', "$returnto&type=signup" ),
- 'active' => $title->isSpecial( 'Userlogin' ) && $is_signup
- );
- }
- global $wgServer, $wgSecureLogin;
- if( substr( $wgServer, 0, 5 ) === 'http:' && $wgSecureLogin ) {
- $title = SpecialPage::getTitleFor( 'Userlogin' );
- $https_url = preg_replace( '/^http:/', 'https:', $title->getFullURL() );
- $login_url['href'] = $https_url;
- # @todo FIXME: Class depends on skin
- $login_url['class'] = 'link-https';
- if ( isset( $createaccount_url ) ) {
- $https_url = preg_replace( '/^http:/', 'https:',
- $title->getFullURL( 'type=signup' ) );
- $createaccount_url['href'] = $https_url;
- # @todo FIXME: Class depends on skin
- $createaccount_url['class'] = 'link-https';
- }
- }
-
- if ( isset( $createaccount_url ) ) {
- $personal_urls['createaccount'] = $createaccount_url;
- }
if( $this->showIPinHeader() ) {
$href = &$this->userpageUrlDetails['href'];
'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 ) );
}
if ( isset( $this->data['nav_urls']['print'] ) && $this->data['nav_urls']['print'] ) {
$toolbox['print'] = $this->data['nav_urls']['print'];
+ $toolbox['print']['id'] = 't-print';
$toolbox['print']['rel'] = 'alternate';
$toolbox['print']['msg'] = 'printableversion';
}
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() );
}
}
-