r61235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61234‎ | r61235 | r61236 >
Date:03:49, 19 January 2010
Author:aaron
Status:ok (Comments)
Tags:
Comment:
markHistoryRow() CSS fixes
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1394,20 +1394,23 @@
13951395 if ( !isset( $row->fr_quality ) ) {
13961396 return array( "", "" ); // not reviewed
13971397 }
1398 - $css = FlaggedRevsXML::getQualityColor( $row->fr_quality );
 1398+ $liCss = FlaggedRevsXML::getQualityColor( $row->fr_quality );
13991399 $user = User::whois( $row->fr_user ); // FIXME: o(N)
14001400 $flags = explode( ',', $row->fr_flags );
14011401 if ( in_array( 'auto', $flags ) ) {
14021402 $msg = 'revreview-hist-autoreviewed';
 1403+ $css = 'fr-hist-autoreviewed';
 1404+ } elseif( $row->fr_quality >= 1 ) {
 1405+ $msg = 'revreview-hist-quality-user';
 1406+ $css = 'fr-hist-quality-user';
14031407 } else {
1404 - $msg = ( $row->fr_quality >= 1 )
1405 - ? 'revreview-hist-quality-user'
1406 - : 'revreview-hist-basic-user';
 1408+ $msg = 'revreview-hist-basic-user';
 1409+ $css = 'fr-hist-basic-user';
14071410 }
14081411 $st = $title->getPrefixedDBkey();
1409 - $link = "<span class='fr-$msg plainlinks'>[" .
 1412+ $link = "<span class='$css plainlinks'>[" .
14101413 wfMsgExt( $msg, array( 'parseinline' ), $st, $row->rev_id, $user ) . "]</span>";
1411 - return array( $link, $css );
 1414+ return array( $link, $liCss );
14121415 }
14131416
14141417 /**
@@ -1506,7 +1509,11 @@
15071510 # Normally, this should already be done and given here...
15081511 if ( !is_array( $flags ) ) {
15091512 if ( $oldSv ) { // use the last stable version if $flags not given
1510 - $flags = self::getAutoReviewTags( $oldSv->getQuality() /* available */ );
 1513+ if( $user->isAllowed( 'bot' ) ) {
 1514+ $flags = $oldSv->getTags(); // no change for bots
 1515+ } else {
 1516+ $flags = self::getAutoReviewTags( $oldSv->getQuality() /* available */ );
 1517+ }
15111518 } else { // new page? use minimal level
15121519 $flags = self::getAutoReviewTags( FR_SIGHTED );
15131520 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r61236Missing commit from r61235aaron03:50, 19 January 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   03:54, 19 January 2010

Missing from summary: also does bug 22138 ('Bots should leave any status of revisions unchanged') for bot auto-review.

Status & tagging log