X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=f742577ac8151e58e440d65d6b5457445f6b9932;hp=c23e289bbe02425bbb543ab926bb7948171e6a1d;hpb=a0a8b770cc385891b51abd73a0e32fdfa5223c50;p=lhc%2Fweb%2Fwiklou.git
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index c23e289bbe..21d3578d81 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -54,10 +54,7 @@ class NostalgiaTemplate extends LegacyTemplate {
$s .= '
' . $ol;
}
- $cat = '
' . $this->getSkin()->getCategoryLinks() . '
';
- if( $cat ) {
- $s .= '
' . $cat;
- }
+ $s .= $this->getSkin()->getCategories();
$s .= "
\n\n";
$s .= "\n";
@@ -69,13 +66,12 @@ class NostalgiaTemplate extends LegacyTemplate {
* @return string
*/
function topLinks() {
- global $wgOut, $wgUser;
$sep = " |\n";
$s = $this->getSkin()->mainPageLink() . $sep
. Linker::specialLink( 'Recentchanges' );
- if ( $wgOut->isArticle() ) {
+ if ( $this->data['isarticle'] ) {
$s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->talkLink() .
$sep . $this->historyLink();
}
@@ -83,30 +79,31 @@ class NostalgiaTemplate extends LegacyTemplate {
/* show links to different language variants */
$s .= $this->variantLinks();
$s .= $this->extensionTabLinks();
- if ( $wgUser->isAnon() ) {
+ if ( !$this->data['loggedin'] ) {
$s .= $sep . Linker::specialLink( 'Userlogin' );
} else {
/* show user page and user talk links */
- $s .= $sep . Linker::link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
- $s .= $sep . Linker::link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
- if ( $wgUser->getNewtalk() ) {
+ $user = $this->getSkin()->getUser();
+ $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) );
+ $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+ if ( $user->getNewtalk() ) {
$s .= ' *';
}
/* show watchlist link */
$s .= $sep . Linker::specialLink( 'Watchlist' );
/* show my contributions link */
$s .= $sep . Linker::link(
- SpecialPage::getSafeTitleFor( 'Contributions', $wgUser->getName() ),
+ SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ),
wfMsgHtml( 'mycontris' ) );
/* show my preferences link */
$s .= $sep . Linker::specialLink( 'Preferences' );
/* show upload file link */
- if( UploadBase::isEnabled() && UploadBase::isAllowed( $wgUser ) === true ) {
+ if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
$s .= $sep . $this->getUploadLink();
}
/* show log out link */
- $s .= $sep . $this->getSkin()->specialLink( 'Userlogout' );
+ $s .= $sep . Linker::specialLink( 'Userlogout' );
}
$s .= $sep . $this->specialPagesList();