* Copyvio that shouldn't have been checked in
[lhc/web/wiklou.git] / skins / Nostalgia.php
index 301bbf0..36ee791 100644 (file)
@@ -1,24 +1,35 @@
 <?php
-# See skin.doc
-
+/**
+ * See skin.txt
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die();
+
+/**
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Skins
+ */
 class SkinNostalgia extends Skin {
 
-       function initPage()
-       {
+       function initPage() {
                # ...
        }
 
-       function getStylesheet()
-       {
-               return "nostalgia.css";
+       function getStylesheet() {
+               return 'common/nostalgia.css';
        }
        function getSkinName() {
                return "nostalgia";
        }
 
-       function doBeforeContent()
-       {
-               global $wgUser, $wgOut, $wgTitle, $wgSiteNotice;
+       function doBeforeContent() {
+               global $wgUser, $wgOut, $wgTitle;
 
                $s = "\n<div id='content'>\n<div id='topbar'>";
                $s .= $this->logoText( "right" );
@@ -27,8 +38,10 @@ class SkinNostalgia extends Skin {
                $s .= $this->pageSubtitle() . "\n";
 
                $s .= $this->topLinks() . "\n<br />";
-               if( $wgSiteNotice ) {
-                       $s .= "\n<div id='siteNotice'>$wgSiteNotice</div>\n";
+
+               $notice = wfGetSiteNotice();
+               if( $notice ) {
+                       $s .= "\n<div id='siteNotice'>$notice</div>\n";
                }
                $s .= $this->pageTitleLinks();
 
@@ -44,8 +57,7 @@ class SkinNostalgia extends Skin {
                return $s;
        }
 
-       function topLinks()
-       {
+       function topLinks() {
                global $wgOut, $wgUser;
                $sep = " |\n";
 
@@ -56,7 +68,7 @@ class SkinNostalgia extends Skin {
                        $s .=  $sep . $this->editThisPage()
                          . $sep . $this->historyLink();
                }
-               if ( 0 == $wgUser->getID() ) {
+               if ( $wgUser->isAnon() ) {
                        $s .= $sep . $this->specialLink( "userlogin" );
                } else {
                        $s .= $sep . $this->specialLink( "userlogout" );
@@ -66,10 +78,7 @@ class SkinNostalgia extends Skin {
                return $s;
        }
 
-       function doAfterContent()
-       {
-               global $wgUser, $wgOut;
-
+       function doAfterContent() {
                $s = "\n</div><br clear='all' />\n";
 
                $s .= "\n<div id='footer'><hr />";