CologneBlue rewrite: kill pageStats() and rewrite pageTitleLinks()
authorMatmaRex <matma.rex@gmail.com>
Wed, 26 Sep 2012 19:19:16 +0000 (21:19 +0200)
committerMatmaRex <matma.rex@gmail.com>
Thu, 4 Oct 2012 19:33:41 +0000 (21:33 +0200)
Use getFooterLinks instead. This removes "Printable version" from the
header links and add a "About" link instead.

Change-Id: I69ee93a9ce900651711274972f4dd79b766df78c

skins/CologneBlue.php

index 7b32022..723278d 100644 (file)
@@ -161,29 +161,17 @@ class CologneBlueTemplate extends BaseTemplate {
                return $s;
        }
 
+       // @fixed
        function pageTitleLinks() {
-               global $wgOut, $wgUser, $wgRequest, $wgLang;
-
-               $oldid = $wgRequest->getVal( 'oldid' );
-               $diff = $wgRequest->getVal( 'diff' );
-               $action = $wgRequest->getText( 'action' );
-
-               $skin = $this->getSkin();
-               $title = $skin->getTitle();
-
-               $s[] = $this->printableLink();
-               $disclaimer = $skin->disclaimerLink(); # may be empty
-
-               if ( $disclaimer ) {
-                       $s[] = $disclaimer;
-               }
-
-               $privacy = $skin->privacyLink(); # may be empty too
-
-               if ( $privacy ) {
-                       $s[] = $privacy;
+               global $wgLang;
+               
+               $s = array();
+               $footlinks = $this->getFooterLinks();
+               
+               foreach ( $footlinks['places'] as $item ) {
+                       $s[] = $this->data[$item];
                }
-
+               
                return $wgLang->pipeList( $s );
        }
 
@@ -517,23 +505,6 @@ class CologneBlueTemplate extends BaseTemplate {
 
                return $s;
        }
-
-       function pageStats() {
-               $ret = array();
-               $items = array( 'viewcount', 'credits', 'lastmod', 'numberofwatchingusers', 'copyright' );
-
-               foreach( $items as $item ) {
-                       if ( $this->data[$item] !== false ) {
-                               $ret[] = $this->data[$item];
-                       }
-               }
-
-               return implode( ' ', $ret );
-       }
-
-
-
-
        
        /**
         * @return string
@@ -597,8 +568,14 @@ class CologneBlueTemplate extends BaseTemplate {
                        $this->getSkin()->aboutLink(),
                        $this->searchForm( 'afterContent' )
                ) );
-
-               $s .= "\n<br />" . $this->pageStats();
+               
+               $s .= "\n<br />";
+               $footlinks = $this->getFooterLinks();
+               if ( $footlinks['info'] ) {
+                       foreach ( $footlinks['info'] as $item ) {
+                               $s .= $this->data[$item] . ' ';
+                       }
+               }
 
                $s .= "\n</div>\n</div>\n";