From: Brion Vibber Date: Sat, 17 May 2003 04:40:09 +0000 (+0000) Subject: Option to hide IP addresses in page header so can use file page cache X-Git-Tag: 1.1.0~552 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=b4746dab12acfca05ad3f521b8cbfa04911593e3;p=lhc%2Fweb%2Fwiklou.git Option to hide IP addresses in page header so can use file page cache --- diff --git a/includes/Skin.php b/includes/Skin.php index 407f2fc936..c8733acc77 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -407,29 +407,32 @@ function toggleVisibility( _levelId, _otherId, _linkId) { function nameAndLogin() { - global $wgUser, $wgTitle, $wgLang; + global $wgUser, $wgTitle, $wgLang, $wgShowIPinHeader; $li = $wgLang->specialPage( "Userlogin" ); $lo = $wgLang->specialPage( "Userlogout" ); $s = ""; if ( 0 == $wgUser->getID() ) { - $n = getenv( "REMOTE_ADDR" ); + if( $wgShowIPinHeader ) { + $n = getenv( "REMOTE_ADDR" ); + + $tl = $this->makeKnownLink( $wgLang->getNsText( + Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}", + $wgLang->getNsText( Namespace::getTalk( 0 ) ) ); + + $s .= $n . " (".$tl.")"; + } else { + $s .= wfMsg("notloggedin"); + } + $rt = $wgTitle->getPrefixedURL(); if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { $q = ""; } else { $q = "returnto={$rt}"; } - - - $tl = $this->makeKnownLink( $wgLang->getNsText( - Namespace::getTalk( Namespace::getUser() ) ) . ":{$n}", - $wgLang->getNsText( Namespace::getTalk( 0 ) ) ); - - $s .= $n . " (".$tl.")" . "\n
" . $this->makeKnownLink( $li, - wfMsg( "login" ), $q ); - - $tl = " ({$tl})"; + $s .= "\n
" . $this->makeKnownLink( $li, + wfMsg( "login" ), $q ); } else { $n = $wgUser->getName(); $rt = $wgTitle->getPrefixedURL();