CologneBlue rewrite: kill mWatchLinkNum, watchThisPage() is only called once now
authorMatmaRex <matma.rex@gmail.com>
Wed, 26 Sep 2012 16:26:36 +0000 (18:26 +0200)
committerMatmaRex <matma.rex@gmail.com>
Wed, 26 Sep 2012 20:34:43 +0000 (22:34 +0200)
Change-Id: I2dc14da83d0823ae727d8fb610f6c2c7981ce6e2

skins/CologneBlue.php

index d6086af..f225c4d 100644 (file)
@@ -47,8 +47,6 @@ class SkinCologneBlue extends SkinTemplate {
 }
 
 class CologneBlueTemplate extends BaseTemplate {
-       protected $mWatchLinkNum = 0; // Appended to end of watch link id's
-       
        function execute() {
                $this->html( 'headelement' );
                echo $this->beforeContent();
@@ -427,7 +425,6 @@ class CologneBlueTemplate extends BaseTemplate {
 
        function watchThisPage() {
                global $wgOut, $wgUser;
-               ++$this->mWatchLinkNum;
 
                // Cache
                $title = $this->getSkin()->getTitle();
@@ -439,14 +436,14 @@ class CologneBlueTemplate extends BaseTemplate {
                                        'action' => 'unwatch',
                                        'token' => UnwatchAction::getUnwatchToken( $title, $wgUser ),
                                );
-                               $id = 'mw-unwatch-link' . $this->mWatchLinkNum;
+                               $id = 'mw-unwatch-link';
                        } else {
                                $text = wfMessage( 'watchthispage' )->text();
                                $query = array(
                                        'action' => 'watch',
                                        'token' => WatchAction::getWatchToken( $title, $wgUser ),
                                );
-                               $id = 'mw-watch-link' . $this->mWatchLinkNum;
+                               $id = 'mw-watch-link';
                        }
 
                        $s = Linker::linkKnown(