Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -858,10 +858,11 @@ |
859 | 859 | * @param int $rev_id |
860 | 860 | * @return Array |
861 | 861 | */ |
862 | | - public static function getRevisionTags( $rev_id ) { |
| 862 | + public static function getRevisionTags( $article, $rev_id ) { |
863 | 863 | $dbr = wfGetDB( DB_SLAVE ); |
864 | 864 | $tags = $dbr->selectField( 'flaggedrevs', 'fr_tags', |
865 | | - array('fr_rev_id' => $rev_id ), |
| 865 | + array( 'fr_rev_id' => $rev_id, |
| 866 | + 'fr_page_id' => $article->getId() ), |
866 | 867 | __METHOD__ ); |
867 | 868 | if( !$tags ) |
868 | 869 | return false; |
— | — | @@ -1765,7 +1766,7 @@ |
1766 | 1767 | return true; |
1767 | 1768 | # GetTitle() for revisions uses slaves and wants page_id,rev_id to |
1768 | 1769 | # match...this is bad if we *just* added it. |
1769 | | - $title = $rev->getTitle() ? $rev->getTitle() : Title::newFromID( $rev->getPage(), FOR_UPDATE ); |
| 1770 | + $title = $rev->getTitle() ? $rev->getTitle() : Title::newFromID( $rev->getPage(), GAID_FOR_UPDATE ); |
1770 | 1771 | # Must be in reviewable namespace |
1771 | 1772 | if( !$title || !self::isPageReviewable( $title ) ) { |
1772 | 1773 | return true; |
Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -969,7 +969,7 @@ |
970 | 970 | if( isset($this->flags[$rev_id]) && $this->flags[$rev_id] ) |
971 | 971 | return $this->flags[$rev_id]; |
972 | 972 | # Get the flags |
973 | | - $flags = FlaggedRevs::getRevisionTags( $rev_id ); |
| 973 | + $flags = FlaggedRevs::getRevisionTags( $this->getTitle(), $rev_id ); |
974 | 974 | # Try to cache results |
975 | 975 | $this->flags[$rev_id] = $flags; |
976 | 976 | |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | $this->notes = ( FlaggedRevs::allowComments() && $wgUser->isAllowed('validate') ) ? |
85 | 85 | $wgRequest->getText('wpNotes') : ''; |
86 | 86 | # Get the revision's current flags, if any |
87 | | - $this->oflags = FlaggedRevs::getRevisionTags( $this->oldid ); |
| 87 | + $this->oflags = FlaggedRevs::getRevisionTags( $this->page, $this->oldid ); |
88 | 88 | # Get our accuracy/quality dimensions |
89 | 89 | $this->dims = array(); |
90 | 90 | $this->unapprovedTags = 0; |