r67569 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67568‎ | r67569 | r67570 >
Date:22:01, 7 June 2010
Author:aaron
Status:deferred
Tags:
Comment:
* Make review checkbox show only if there is an outdated stable version
* Moved 'Show the pending changes diff when viewing...' preference back under 'edit review' tab
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1626,7 +1626,7 @@
16271627 $preferences['flaggedrevsviewdiffs'] =
16281628 array(
16291629 'type' => 'toggle',
1630 - 'section' => 'misc/diffs',
 1630+ 'section' => 'flaggedrevs/flaggedrevs-ui',
16311631 'label-message' => 'flaggedrevs-prefs-viewdiffs',
16321632 );
16331633 }
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1557,12 +1557,13 @@
15581558 */
15591559 public function addReviewCheck( EditPage $editPage, array &$checkboxes, &$tabindex ) {
15601560 global $wgUser, $wgRequest;
1561 - if ( !$this->article->isReviewable() || !$wgUser->isAllowed( 'review' ) ) {
1562 - return true;
1563 - } elseif ( FlaggedRevs::autoReviewNewPages() && !$this->article->exists() ) {
 1561+ if ( !$wgUser->isAllowed( 'review' )
 1562+ || !$this->article->isReviewable()
 1563+ || !$this->article->revsArePending() )
 1564+ {
15641565 return true; // not needed
15651566 }
1566 - $oldid = $wgRequest->getInt( 'oldid', $this->article->getLatest() );
 1567+ $oldid = $wgRequest->getInt( 'baseRevId', $this->article->getLatest() );
15671568 if ( $oldid == $this->article->getLatest() ) {
15681569 $srev = $this->article->getStableRev();
15691570 # For pages with either no stable version, or an outdated one, let

Status & tagging log