* Add $wgFlaggedRevsVisible back. Made for third-party use.
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 23 May 2008 16:47:39 +0000 (16:47 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 23 May 2008 16:47:39 +0000 (16:47 +0000)
* 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

index 7f7548d..a82748f 100644 (file)
@@ -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() {