From 8786c780e0827fedab9950156bc6445e8f39c5f2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 23 May 2008 16:47:39 +0000 Subject: [PATCH] * Add $wgFlaggedRevsVisible back. Made for third-party use. * Add hook to JOIN for data for page history, rather than query spam * Fix a panty load of E_STRICT errors * Tweak variable name --- includes/PageHistory.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 7f7548d593..a82748fddd 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -44,6 +44,10 @@ class PageHistory { function getArticle() { return $this->mArticle; } + + function getTitle() { + return $this->mTitle; + } /** * As we use the same small set of messages in various methods and that @@ -595,12 +599,14 @@ class PageHistoryPager extends ReverseChronologicalPager { } function getQueryInfo() { - return array( - 'tables' => 'revision', + $queryInfo = array( + 'tables' => array('revision'), 'fields' => Revision::selectFields(), 'conds' => array('rev_page' => $this->mPageHistory->mTitle->getArticleID() ), - 'options' => array( 'USE INDEX' => 'page_timestamp' ) + 'options' => array( 'USE INDEX' => array('revision','page_timestamp') ) ); + wfRunHooks( 'PageHistoryPager::getQueryInfo', array( &$this, &$queryInfo ) ); + return $queryInfo; } function getIndexField() { -- 2.20.1