From 0ddb331ccbf0a70299d1f1d9e3f36c4839632378 Mon Sep 17 00:00:00 2001 From: Charles Melbye Date: Tue, 4 Nov 2008 01:53:48 +0000 Subject: [PATCH] Cleaned up some PHP coding style issues, and a few problems with bug 15868. Patch by NSK Nikolaos S. Karastathis. --- skins/Nostalgia.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php index b713cf300e..2b9b2f67d0 100644 --- a/skins/Nostalgia.php +++ b/skins/Nostalgia.php @@ -57,7 +57,7 @@ class SkinNostalgia extends Skin { $sep = " |\n"; $s = $this->mainPageLink() . $sep - . $this->specialLink( "recentchanges" ); + . $this->specialLink( 'recentchanges' ); if ( $wgOut->isArticle() ) { $s .= $sep . $this->editThisPage() @@ -67,14 +67,30 @@ class SkinNostalgia extends Skin { /* show links to different language variants */ $s .= $this->variantLinks(); $s .= $this->extensionTabLinks(); - if ( $wgUser->isAnon() ) { - $s .= $sep . $this->specialLink( "userlogin" ); + $s .= $sep . $this->specialLink( 'userlogin' ); } else { + $name = $wgUser->getName(); + /* show user page and user talk links */ + $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); + $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); + if ( $wgUser->getNewtalk() ) { + $s .= ' *'; + } + /* show watchlist link */ + $s .= $sep . $this->specialLink( 'watchlist' ); + /* show my contributions link */ + $s .= $sep . $this->link( + SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), + wfMsgHtml( 'mycontris' ) ); + /* show my preferences link */ + $s .= $sep . $this->specialLink( 'preferences' ); + /* show upload file link */ if ( $wgEnableUploads ) { - $s .= $sep . $this->specialLink( "upload" ); + $s .= $sep . $this->specialLink( 'upload' ); } - $s .= $sep . $this->specialLink( "userlogout" ); + /* show log out link */ + $s .= $sep . $this->specialLink( 'userlogout' ); } $s .= $sep . $this->specialPagesList(); -- 2.20.1