Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php |
— | — | @@ -379,6 +379,7 @@ |
380 | 380 | } |
381 | 381 | |
382 | 382 | $dbw = wfGetDB( DB_MASTER ); |
| 383 | + $article = new Article( $this->page ); |
383 | 384 | # Get current config |
384 | 385 | $row = $dbw->selectRow( 'flaggedpage_config', |
385 | 386 | array( 'fpc_select', 'fpc_override', 'fpc_level', 'fpc_expiry' ), |
— | — | @@ -412,11 +413,16 @@ |
413 | 414 | ); |
414 | 415 | } |
415 | 416 | } |
416 | | - $query = ''; |
417 | 417 | // Check if this actually changed anything... |
418 | 418 | if( $changed ) { |
419 | 419 | $id = $this->page->getArticleId(); |
420 | 420 | $latest = $this->page->getLatestRevID( GAID_FOR_UPDATE ); |
| 421 | + # Config may have changed to allow stable versions...refresh page |
| 422 | + # tracking to account for any hidden reviewed versions. |
| 423 | + $frev = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
| 424 | + if( $frev ) { |
| 425 | + FlaggedRevs::updateStableVersion( $article, $frev->getRevision(), $latest ); |
| 426 | + } |
421 | 427 | # ID, accuracy, depth, style |
422 | 428 | $set = array(); |
423 | 429 | # @FIXME: do this better |
— | — | @@ -459,7 +465,6 @@ |
460 | 466 | $nullRevision = Revision::newNullRevision( $dbw, $id, $comment, true ); |
461 | 467 | $nullRevId = $nullRevision->insertOn( $dbw ); |
462 | 468 | # Update page record and touch page |
463 | | - $article = new Article( $this->page ); |
464 | 469 | $article->updateRevisionOn( $dbw, $nullRevision, $latest ); |
465 | 470 | wfRunHooks( 'NewRevisionFromEditComplete', array($article, $nullRevision, $latest) ); |
466 | 471 | |
— | — | @@ -477,11 +482,6 @@ |
478 | 483 | $text = $nullRevision->getText(); |
479 | 484 | FlaggedRevs::autoReviewEdit( $article, $wgUser, $text, $nullRevision, $flags, true ); |
480 | 485 | $invalidate = false; // already done with auto-review |
481 | | - // ...otherwise, go to diff if possible |
482 | | - } elseif( $frev ) { |
483 | | - $query = "oldid={$frev->getRevId()}&diff=cur&diffonly=0"; |
484 | | - } else { |
485 | | - // can't autoreview and no diff to show... |
486 | 486 | } |
487 | 487 | } |
488 | 488 | # Update the links tables as the stable version may now be the default page... |