Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -1826,12 +1826,11 @@ |
1827 | 1827 | foreach( self::$dimensions as $tag => $minQL ) { |
1828 | 1828 | $flags[$tag] = 1; |
1829 | 1829 | } |
1830 | | - # Select the version that is now current. Create a new article object |
1831 | | - # to avoid using one with outdated field data. |
1832 | | - $article = new Article( $article->getTitle() ); |
1833 | | - $newRev = Revision::newFromId( $article->getLatest() ); |
1834 | | - self::autoReviewEdit( $article, $user, $rev->getText(), $newRev, $flags ); |
1835 | | - self::articleLinksUpdate( $article ); // lame... |
| 1830 | + $newRev = Revision::newFromId( $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE) ); |
| 1831 | + if( $newRev ) { |
| 1832 | + self::autoReviewEdit( $article, $user, $rev->getText(), $newRev, $flags ); |
| 1833 | + self::articleLinksUpdate( $article ); // lame... |
| 1834 | + } |
1836 | 1835 | } |
1837 | 1836 | if( $wgFlaggedArticle ) { |
1838 | 1837 | $wgFlaggedArticle->skipReviewDiff = true; // Don't jump to diff... |