r82904 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82903‎ | r82904 | r82905 >
Date:19:57, 27 February 2011
Author:aaron
Status:ok
Tags:
Comment:
(bug 27750) Made injectPostEditURLParams() avoid using silly Title::getLatestRevID() and use revsArePending() instead
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedArticleView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
@@ -1626,12 +1626,7 @@
16271627 $this->load();
16281628 # Get the stable version from the master
16291629 $frev = $this->article->getStableRev( FR_MASTER );
1630 - if ( !$frev ) {
1631 - return true;
1632 - }
1633 - # Get latest revision Id (lag safe)
1634 - $latest = $this->article->getTitle()->getLatestRevID( Title::GAID_FOR_UPDATE );
1635 - if ( $latest == $frev->getRevId() ) {
 1630+ if ( !$frev || !$this->article->revsArePending() ) {
16361631 return true; // only for pages with pending edits
16371632 }
16381633 // If the edit was not autoreviewed, and the user can actually make a
@@ -1652,7 +1647,7 @@
16531648 // Pass a section parameter in the URL as needed to add a link to
16541649 // the "your changes are pending" box on the top of the page...
16551650 $section = str_replace(
1656 - array( ':' , '.' ), array( '%3A', '%' ), // hack: reverse special encoding
 1651+ array( ':' , '.' ), array( '%3A', '%' ), // hack: reverse encoding
16571652 substr( $sectionAnchor, 1 ) // remove the '#'
16581653 );
16591654 $extraQuery .= '&fromsection=' . $section;

Status & tagging log