http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82904
Revision: 82904
Author: aaron
Date: 2011-02-27 19:57:53 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
(bug 27750) Made injectPostEditURLParams() avoid using silly
Title::getLatestRevID() and use revsArePending() instead
Modified Paths:
--------------
trunk/extensions/FlaggedRevs/FlaggedArticleView.php
Modified: trunk/extensions/FlaggedRevs/FlaggedArticleView.php
===================================================================
--- trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2011-02-27 17:53:18 UTC
(rev 82903)
+++ trunk/extensions/FlaggedRevs/FlaggedArticleView.php 2011-02-27 19:57:53 UTC
(rev 82904)
@@ -1626,12 +1626,7 @@
$this->load();
# Get the stable version from the master
$frev = $this->article->getStableRev( FR_MASTER );
- if ( !$frev ) {
- return true;
- }
- # Get latest revision Id (lag safe)
- $latest = $this->article->getTitle()->getLatestRevID(
Title::GAID_FOR_UPDATE );
- if ( $latest == $frev->getRevId() ) {
+ if ( !$frev || !$this->article->revsArePending() ) {
return true; // only for pages with pending edits
}
// If the edit was not autoreviewed, and the user can actually
make a
@@ -1652,7 +1647,7 @@
// Pass a section parameter in the URL
as needed to add a link to
// the "your changes are pending" box
on the top of the page...
$section = str_replace(
- array( ':' , '.' ), array(
'%3A', '%' ), // hack: reverse special encoding
+ array( ':' , '.' ), array(
'%3A', '%' ), // hack: reverse encoding
substr( $sectionAnchor, 1 ) //
remove the '#'
);
$extraQuery .= '&fromsection=' .
$section;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs