Followup r91672: remove commented-out reference to removed file (rtl.css)
[lhc/web/wiklou.git] / includes / QueryPage.php
index 4e01338..da8faf5 100644 (file)
@@ -381,11 +381,9 @@ abstract class QueryPage extends SpecialPage {
        }
 
        /**
-        * Parameters and order changed in 1.18
-        *
         * Somewhat deprecated, you probably want to be using execute()
         */
-       function doQuery( $offset = false, $limit ) {
+       function doQuery( $offset = false, $limit = false ) {
                if ( $this->isCached() && $this->isCacheable() ) {
                        return $this->fetchFromCache( $limit, $offset );
                } else {
@@ -439,15 +437,16 @@ abstract class QueryPage extends SpecialPage {
         * real, honest-to-gosh query page.
         */
        function execute( $par ) {
-               global $wgUser, $wgOut, $wgLang;
+               global $wgUser, $wgOut, $wgLang, $wgRequest;
 
                if ( !$this->userCanExecute( $wgUser ) ) {
                        $this->displayRestrictionError();
                        return;
                }
 
-               if ( $this->limit == 0 && $this->offset == 0 )
-                       list( $this->limit, $this->offset ) = wfCheckLimits();
+               if ( $this->limit == 0 && $this->offset == 0 ) {
+                       list( $this->limit, $this->offset ) = $wgRequest->getLimitOffset();
+               }
                $dbr = wfGetDB( DB_SLAVE );
 
                $this->setHeaders();
@@ -522,7 +521,7 @@ abstract class QueryPage extends SpecialPage {
                # with more than a straight list, so we hand them the info, plus
                # an OutputPage, and let them get on with it
                $this->outputResults( $wgOut,
-                       $wgUser->getSkin(),
+                       $this->getSkin(),
                        $dbr, # Should use a ResultWrapper for this
                        $res,
                        $this->numRows,
@@ -689,8 +688,7 @@ abstract class QueryPage extends SpecialPage {
 
        function feedTitle() {
                global $wgLanguageCode, $wgSitename;
-               $page = SpecialPage::getPage( $this->getName() );
-               $desc = $page->getDescription();
+               $desc = $this->getDescription();
                return "$wgSitename - $desc [$wgLanguageCode]";
        }
 
@@ -699,8 +697,7 @@ abstract class QueryPage extends SpecialPage {
        }
 
        function feedUrl() {
-               $title = SpecialPage::getTitleFor( $this->getName() );
-               return $title->getFullURL();
+               return $this->getTitle()->getFullURL();
        }
 }