r80201 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80200‎ | r80201 | r80202 >
Date:22:42, 13 January 2011
Author:dantman
Status:ok (Comments)
Tags:
Comment:
Fix bug 26034; Make the View / Read tab in content_navigation style tabs (skins like Vector) stay selected when on &action=purge.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -842,7 +842,7 @@
843843 $content_navigation['views']['view'] = $this->tabAction(
844844 $isTalk ? $talkPage : $subjectPage,
845845 !wfEmptyMsg( "$skname-view-view" ) ? "$skname-view-view" : 'view',
846 - ( $onPage && $action == 'view' ), '', true
 846+ ( $onPage && ($action == 'view' || $action == 'purge' ) ), '', true
847847 );
848848 $content_navigation['views']['view']['redundant'] = true; // signal to hide this from simple content_actions
849849 }
Index: trunk/phase3/RELEASE-NOTES
@@ -73,6 +73,8 @@
7474 * (bug 25506) Exception is thrown if OutputPage::parse is called inside a tag hook,
7575 which would reset parser state
7676 * (bug 26208) Mark directionality of some interlanguage links
 77+* (bug 26034) Make the "View / Read" tab in content_navigation style tabs remain
 78+ selected when the action is "purge".
7779
7880 === API changes in 1.18 ===
7981 * (bug 26339) Throw warning when truncating an overlarge API result

Follow-up revisions

RevisionCommit summaryAuthorDate
r80204Backporting the equivilant of r80201 on request to 1.17 (the change is a litt...dantman22:52, 13 January 2011

Comments

#Comment by Nikerabbit (talk | contribs)   07:56, 14 January 2011

Shouldn't this take into consideration whether the purge requests confirmation or not?

#Comment by Dantman (talk | contribs)   08:02, 14 January 2011

We don't seem to differentiate between that anywhere else we do this style of check.

Take a look at SkinTemplate::buildNavUrls, it's got another check which is essentially the same.

I suppose a follow up with some fancy class that lets us properly map &action= to actions and request information about what action is being used in the current page or something like that is a potential feature. Though that'll definitely be a 1.18 only thing.

Status & tagging log