Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1457,14 +1457,8 @@ |
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | public static function addToHistQuery( $pager, &$queryInfo ) { |
1461 | | - if( isset( $pager->mPageHistory ) ) { |
1462 | | - // 1.15 or before |
1463 | | - $historyPage = $pager->mPageHistory; |
1464 | | - } else { |
1465 | | - // 1.16 after r55168 |
1466 | | - $historyPage = $pager->historyPage; |
1467 | | - } |
1468 | | - $flaggedArticle = FlaggedArticle::getTitleInstance( $historyPage->getTitle() ); |
| 1461 | + $title = $pager->getArticle()->getTitle(); |
| 1462 | + $flaggedArticle = FlaggedArticle::getTitleInstance( $title ); |
1469 | 1463 | # Non-content pages cannot be validated. Stable version must exist. |
1470 | 1464 | if( $flaggedArticle->isReviewable() && $flaggedArticle->getStableRev() ) { |
1471 | 1465 | $queryInfo['tables'][] = 'flaggedrevs'; |