r47697 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47696‎ | r47697 | r47698 >
Date:10:00, 23 February 2009
Author:aaron
Status:ok
Tags:
Comment:
* Don't show review level if there is one one available
* Tweaked 'under review' link style
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/flaggedrevs.css (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -253,7 +253,7 @@
254254 $wgAvailableRights[] = 'movestable';
255255
256256 # Bump this number every time you change flaggedrevs.css/flaggedrevs.js
257 -$wgFlaggedRevStyleVersion = 54;
 257+$wgFlaggedRevStyleVersion = 55;
258258
259259 $wgExtensionFunctions[] = 'efLoadFlaggedRevs';
260260
Index: trunk/extensions/FlaggedRevs/flaggedrevs.css
@@ -274,6 +274,10 @@
275275 background-color: #faebd7;
276276 }
277277
 278+.fr-under-review {
 279+ background-color: yellow;
 280+}
 281+
278282 /* Review form */
279283 .flaggedrevs_reviewform {
280284 background-color: #f9f9f9;
@@ -336,6 +340,7 @@
337341 display: none;
338342 }
339343
 344+/* Reader feedback form */
340345 .fr_reader_feedback_graph {
341346 width: 100%;
342347 overflow: auto;
Index: trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php
@@ -176,17 +176,22 @@
177177
178178 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
179179 $link = $this->skin->makeKnownLinkObj( $title );
180 - $css = $stxt = $review = '';
 180+ $css = $stxt = $review = $quality = $underReview = '';
181181 $stxt = ChangesList::showCharacterDifference( $row->rev_len, $row->page_len );
182182 $review = $this->skin->makeKnownLinkObj( $title, wfMsg('oldreviewed-diff'),
183183 "diff=cur&oldid={$row->fp_stable}&diffonly=0" );
184 - $quality = $row->fp_quality ? wfMsgHtml('oldreviewedpages-quality') : wfMsgHtml('oldreviewedpages-stable');
 184+ # Show quality level if there are several
 185+ if( FlaggedRevs::qualityVersions() ) {
 186+ $quality = $row->fp_quality ?
 187+ wfMsgHtml('oldreviewedpages-quality') : wfMsgHtml('oldreviewedpages-stable');
 188+ $quality = " <b>[{$quality}]</b>";
 189+ }
185190 # Is anybody watching?
186191 if( !$this->including() && $wgUser->isAllowed( 'unreviewedpages' ) ) {
187192 $uw = UnreviewedPages::usersWatching( $title );
188193 $watching = $uw ?
189194 wfMsgExt('oldreviewedpages-watched','parsemag',$uw,$uw) : wfMsgHtml('oldreviewedpages-unwatched');
190 - $watching = ' '.$watching;
 195+ $watching = " {$watching}";
191196 } else {
192197 $uw = -1;
193198 $watching = ''; // leave out data
@@ -215,10 +220,12 @@
216221 $age = ""; // wtf?
217222 }
218223 $key = wfMemcKey( 'stableDiffs', 'underReview', $row->fp_stable, $row->page_latest );
219 - $val = $wgMemc->get( $key );
220 - $underReview = $val ? wfMsgHtml('oldreviewedpages-viewing') : '';
 224+ # Show if a user is looking at this page
 225+ if( ($val = $wgMemc->get($key)) ) {
 226+ $underReview = " <b class='fr-under-review'>".wfMsgHtml('oldreviewedpages-viewing').'</b>';
 227+ }
221228
222 - return( "<li{$css}>{$link} {$stxt} ({$review}) <i>{$age}</i> <b>[{$quality}]</b>{$watching} <b>{$underReview}</b></li>" );
 229+ return( "<li{$css}>{$link} {$stxt} ({$review}) <i>{$age}</i>{$quality}{$watching}{$underReview}</li>" );
223230 }
224231
225232 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r47698Use fr-under-review class here too per r47697aaron10:04, 23 February 2009

Status & tagging log