Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -270,6 +270,11 @@ |
271 | 271 | $this->tagFilter = $tagFilter; |
272 | 272 | $this->getDateCond( $year, $month ); |
273 | 273 | } |
| 274 | + |
| 275 | + // For hook compatibility... |
| 276 | + function getArticle() { |
| 277 | + return $this->historyPage->getArticle(); |
| 278 | + } |
274 | 279 | |
275 | 280 | function getQueryInfo() { |
276 | 281 | $queryInfo = array( |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1457,7 +1457,14 @@ |
1458 | 1458 | } |
1459 | 1459 | |
1460 | 1460 | public static function addToHistQuery( $pager, &$queryInfo ) { |
1461 | | - $flaggedArticle = FlaggedArticle::getTitleInstance( $pager->mPageHistory->getTitle() ); |
| 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() ); |
1462 | 1469 | # Non-content pages cannot be validated. Stable version must exist. |
1463 | 1470 | if( $flaggedArticle->isReviewable() && $flaggedArticle->getStableRev() ) { |
1464 | 1471 | $queryInfo['tables'][] = 'flaggedrevs'; |