}
/**
- * 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 {
* 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();
# 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,
function feedTitle() {
global $wgLanguageCode, $wgSitename;
- $page = SpecialPage::getPage( $this->getName() );
- $desc = $page->getDescription();
+ $desc = $this->getDescription();
return "$wgSitename - $desc [$wgLanguageCode]";
}
}
function feedUrl() {
- $title = SpecialPage::getTitleFor( $this->getName() );
- return $title->getFullURL();
+ return $this->getTitle()->getFullURL();
}
}