r68112 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68111‎ | r68112 | r68113 >
Date:00:57, 16 June 2010
Author:aaron
Status:ok
Tags:
Comment:
MFT r68111
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/FlaggedRevs/language (modified) (history)

Diff [purge]

Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs/language
___________________________________________________________________
Name: svn:mergeinfo
11 - /branches/REL1_15/phase3/extensions/FlaggedRevs_alpha/language:51646
/trunk/extensions/FlaggedRevs/language:63264-67411,68032-68106
/trunk/extensions/FlaggedRevs_alpha/language:56207,56209,56296,56333,56355
/trunk/phase3/extensions/FlaggedRevs_alpha/language:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
22 + /branches/REL1_15/phase3/extensions/FlaggedRevs_alpha/language:51646
/trunk/extensions/FlaggedRevs/language:63264-67411,68032-68106,68111
/trunk/extensions/FlaggedRevs_alpha/language:56207,56209,56296,56333,56355
/trunk/phase3/extensions/FlaggedRevs_alpha/language:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1236,11 +1236,10 @@
12371237 # Check the page sync value cache...
12381238 $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $this->article->getId() );
12391239 $value = FlaggedRevs::getMemcValue( $wgMemc->get( $key ), $this->article );
1240 - # Default sync val as false to trigger query
1241 - $synced = ( $value === "true" ) ? true : false;
12421240
12431241 $changeList = array();
1244 - if ( !$synced ) {
 1242+ # Trigger queries if sync cache value is not 'true'
 1243+ if ( $value !== "true" ) {
12451244 # Add a list of links to each changed template...
12461245 $changeList = array_merge( $changeList, $this->fetchTemplateChanges( $frev ) );
12471246 # Add a list of links to each changed file...
@@ -1249,48 +1248,49 @@
12501249
12511250 # Some important information about include version selection...
12521251 $notice = '';
1253 - if ( count( $changeList ) > 0 ) {
1254 - # We use the stable version of includes, unless set otherwise
1255 - if ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ) {
1256 - $notice = wfMsgExt( 'revreview-update-use', 'parse' );
1257 - }
1258 - } elseif ( !$synced ) {
1259 - # Bad cache said they were not synced
1260 - $this->article->getTitle()->invalidateCache();
 1252+ if ( count( $changeList ) ) {
 1253+ $notice = wfMsgExt( 'revreview-update-use', 'parse' );
 1254+ } elseif ( $value === "false" ) {
 1255+ global $wgParserCacheExpireTime;
 1256+ # Correct bad cache which said they were not synced
 1257+ $data = FlaggedRevs::makeMemcObj( "true" );
 1258+ $wgMemc->set( $key, $data, $wgParserCacheExpireTime );
12611259 }
1262 -
1263 - # If the user is allowed to review, prompt them!
1264 - # Only those if there is something to actually review.
1265 - if ( $wgRequest->getInt( 'shownotice' )
1266 - && $newRev->isCurrent()
1267 - && $newRev->getRawUserText() == $wgUser->getName() )
1268 - {
 1260+ # If there are pending revs or templates/files changes,
 1261+ # notify the user and prompt them to review them...
 1262+ if ( $this->article->revsArePending() || count( $changeList ) ) {
12691263 // Reviewer just edited...
1270 - $title = $this->article->getTitle(); // convenience
1271 - // @TODO: make diff class cache this
1272 - $n = $title->countRevisionsBetween( $oldRev->getId(), $newRev->getId() );
1273 - if ( $n ) {
1274 - $msg = 'revreview-update-edited-prev'; // previous pending edits
 1264+ if ( $wgRequest->getInt( 'shownotice' )
 1265+ && $newRev->isCurrent()
 1266+ && $newRev->getRawUserText() == $wgUser->getName() )
 1267+ {
 1268+ $title = $this->article->getTitle(); // convenience
 1269+ // @TODO: make diff class cache this
 1270+ $n = $title->countRevisionsBetween( $oldRev->getId(), $newRev->getId() );
 1271+ if ( $n ) {
 1272+ $msg = 'revreview-update-edited-prev'; // previous pending edits
 1273+ } else {
 1274+ $msg = 'revreview-update-edited'; // just couldn't autoreview
 1275+ }
 1276+ // All other cases...
12751277 } else {
1276 - $msg = 'revreview-update-edited'; // just couldn't autoreview
 1278+ $msg = 'revreview-update'; // generic "Please review" notice...
12771279 }
1278 - } else {
1279 - $msg = 'revreview-update'; // generic "Please review" notice...
 1280+ $changeDiv = wfMsgExt( $msg, 'parse' );
 1281+ if ( count( $changeList ) ) {
 1282+ # Add include change list...
 1283+ $changeDiv .= '<p>' .
 1284+ wfMsgExt( 'revreview-update-includes', 'parseinline' ) .
 1285+ '&#160;' . implode( ', ', $changeList ) . '</p>';
 1286+ # Add include usage notice...
 1287+ $changeDiv .= $notice;
 1288+ }
 1289+ $css = 'flaggedrevs_diffnotice plainlinks';
 1290+ $form .= "<div id='mw-fr-difftostable' class='$css'>$changeDiv</div>\n";
 1291+
 1292+ # Set a key to note that someone is viewing this
 1293+ $this->markDiffUnderReview( $oldRev, $newRev );
12801294 }
1281 - $changeDiv = wfMsgExt( $msg, 'parse' );
1282 - if ( count( $changeList ) ) {
1283 - # Add include change list...
1284 - $changeDiv .= '<p>' .
1285 - wfMsgExt( 'revreview-update-includes', 'parseinline' ) .
1286 - '&#160;' . implode( ', ', $changeList ) . '</p>';
1287 - # Add include usage notice...
1288 - $changeDiv .= $notice;
1289 - }
1290 - $css = 'flaggedrevs_diffnotice plainlinks';
1291 - $form .= "<div id='mw-fr-difftostable' class='$css'>$changeDiv</div>\n";
1292 -
1293 - # Set a key to note that someone is viewing this
1294 - $this->markDiffUnderReview( $oldRev, $newRev );
12951295 }
12961296 # Add a link to diff from stable to current as needed
12971297 if ( $frev ) {
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs
___________________________________________________________________
Name: svn:mergeinfo
12981298 - /branches/REL1_15/phase3/extensions/FlaggedRevs_alpha:51646
/trunk/extensions/FlaggedRevs:63266-63443,63460-63926,63929,63938,63940-64497,64515-64768,64916-65417,65459-65601,65668-65727,65995,66185-66309,66345,66384-66669,66715-66978,67060-67291,68032-68106
/trunk/extensions/FlaggedRevs_alpha:56207,56209,56296,56333,56355
/trunk/phase3/extensions/FlaggedRevs_alpha:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816
12991299 + /branches/REL1_15/phase3/extensions/FlaggedRevs_alpha:51646
/trunk/extensions/FlaggedRevs:63266-63443,63460-63926,63929,63938,63940-64497,64515-64768,64916-65417,65459-65601,65668-65727,65995,66185-66309,66345,66384-66669,66715-66978,67060-67291,68032-68106,68111
/trunk/extensions/FlaggedRevs_alpha:56207,56209,56296,56333,56355
/trunk/phase3/extensions/FlaggedRevs_alpha:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68111addToDiffView() changes:...aaron00:51, 16 June 2010

Status & tagging log