http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62828

Revision: 62828
Author:   ashley
Date:     2010-02-22 15:16:36 +0000 (Mon, 22 Feb 2010)

Log Message:
-----------
Skin system rewrite: only show these in the footer if we actually have 
something to show

Modified Paths:
--------------
    branches/SkinSystemRewrite/includes/Skin.php

Modified: branches/SkinSystemRewrite/includes/Skin.php
===================================================================
--- branches/SkinSystemRewrite/includes/Skin.php        2010-02-22 13:06:36 UTC 
(rev 62827)
+++ branches/SkinSystemRewrite/includes/Skin.php        2010-02-22 15:16:36 UTC 
(rev 62828)
@@ -3057,11 +3057,19 @@
                global $wgRequest;
                $action = $wgRequest->getVal( 'action', 'view' );
                if ( $this->mTitle->getNamespace() != NS_SPECIAL && $action !== 
'edit' ) {
-                       $s .= "\t\t" . '<li id="lastmod">' . 
$this->lastModified() . '</li>
-                       <li id="viewcount">' . $this->getViewCount() . '</li>
-                       <li id="numberofwatchingusers">' . 
$this->getNumberOfWatchingUsers() . '</li>
-                       <li id="credits">' . $this->getCredits() . '</li>
-                       <li id="copyrights">' . $this->getCopyright() . '</li>' 
. "\n";
+                       $s .= "\t\t" . '<li id="lastmod">' . 
$this->lastModified() . '</li>';
+                       if ( $this->getViewCount() ) {
+                               $s .= "\t\t" . '<li id="viewcount">' . 
$this->getViewCount() . '</li>' . "\n";
+                       }
+                       if ( $this->getNumberOfWatchingUsers() ) {
+                               $s .= "\t\t" . '<li 
id="numberofwatchingusers">' . $this->getNumberOfWatchingUsers() . '</li>' . 
"\n";
+                       }
+                       if ( $this->getCredits() ) {
+                               $s .= "\t\t" . '<li id="credits">' . 
$this->getCredits() . '</li>' . "\n";
+                       }
+                       if ( $this->getCopyright() ) {
+                               $s .= "\t\t" . '<li id="copyrights">' . 
$this->getCopyright() . '</li>' . "\n";
+                       }
                }
                $s .= "\t\t" . '<li id="privacy">' . $this->privacyLink() . 
'</li>
                <li id="about">' . $this->aboutLink() . '</li>



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to