Vector did not show watch star on Special:MovePage
authorDaniel Friesen <pub-github@nadir-seen-fire.com>
Fri, 23 Mar 2012 09:45:47 +0000 (02:45 -0700)
committerAntoine Musso <hashar@free.fr>
Fri, 23 Mar 2012 10:36:05 +0000 (11:36 +0100)
Fix the bug where Vector leaves "unwatch" in an action in the menu
instead of converting it into an icon when you are on
Special:MovePage/Foo.

Apply to when using $wgVectorUseIconWatch = true;

Change-Id: Ie914ac50974aa473fa474931ca69776dd1c2fc54

skins/Vector.php

index 501a267..d1b51a6 100644 (file)
@@ -72,7 +72,7 @@ class VectorTemplate extends BaseTemplate {
                $nav = $this->data['content_navigation'];
 
                if ( $wgVectorUseIconWatch ) {
-                       $mode = $this->getSkin()->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
+                       $mode = $this->getSkin()->getRelevantTitle()->userIsWatching() ? 'unwatch' : 'watch';
                        if ( isset( $nav['actions'][$mode] ) ) {
                                $nav['views'][$mode] = $nav['actions'][$mode];
                                $nav['views'][$mode]['class'] = rtrim( 'icon ' . $nav['views'][$mode]['class'], ' ' );