Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1697,14 +1697,14 @@ |
1698 | 1698 | if( !$baseRevID ) { |
1699 | 1699 | $baseRevID = $wgRequest->getIntOrNull('baseRevId'); |
1700 | 1700 | } |
| 1701 | + $title->resetArticleID( $rev->getPage() ); // avoid db hit |
1701 | 1702 | # Get what was just the current revision ID |
1702 | | - $prevRevID = $title->getPreviousRevisionId( $rev->getId(), GAID_FOR_UPDATE ); |
| 1703 | + $prevRevID = $title->getPreviousRevisionId( $rev->getId() ); |
1703 | 1704 | // New pages |
1704 | 1705 | if( !$prevRevID ) { |
1705 | 1706 | $reviewableNewPage = ( $wgFlaggedRevsAutoReviewNew && $user->isAllowed('review') ); |
1706 | 1707 | // Edits to existing pages |
1707 | 1708 | } else if( $baseRevID ) { |
1708 | | - $title->resetArticleID( $rev->getPage() ); // avoid db hit |
1709 | 1709 | $frev = FlaggedRevision::newFromTitle( $title, $baseRevID, FR_FOR_UPDATE ); |
1710 | 1710 | # If the base revision was not reviewed, check if the previous one was. |
1711 | 1711 | # This should catch null edits as well as normal ones. |