r48257 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48256‎ | r48257 | r48258 >
Date:06:26, 10 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Improved "(under review)" markers
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php
@@ -82,7 +82,7 @@
8383
8484 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
8585 $link = $this->skin->makeKnownLinkObj( $title, null, 'redirect=no&forreview=1' );
86 - $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history&forreview=1' );
 86+ $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history' );
8787 $css = $stxt = $review = $underReview = '';
8888 if( !is_null($size = $row->page_len) ) {
8989 $stxt = ($size == 0)
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -81,8 +81,12 @@
8282 }
8383
8484 public static function markUnderReview( &$output, &$article, &$title, &$user, &$request ) {
 85+ $action = $request->getVal( 'action', 'view' );
 86+ $reviewing = ( $action == 'history' ); // default
 87+ if( $action == 'view' && ($request->getInt('forreview') || $request->getInt('rcid')) )
 88+ $reviewing = true;
8589 # Set a key to note that someone is viewing this
86 - if( $request->getInt('forreview') && $user->isAllowed('review') ) {
 90+ if( $reviewing && $user->isAllowed('review') ) {
8791 global $wgMemc;
8892 $key = wfMemcKey( 'unreviewedPages', 'underReview', $title->getArticleId() );
8993 $wgMemc->set( $key, '1', 20*60 ); // 20 min

Status & tagging log