r86776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86775‎ | r86776 | r86777 >
Date:15:51, 23 April 2011
Author:ialex
Status:ok
Tags:
Comment:
Call $wgRequest->getLimitOffset() directly instead of wfCheckLimits()
Modified paths:
  • /trunk/phase3/includes/QueryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/QueryPage.php
@@ -437,15 +437,16 @@
438438 * real, honest-to-gosh query page.
439439 */
440440 function execute( $par ) {
441 - global $wgUser, $wgOut, $wgLang;
 441+ global $wgUser, $wgOut, $wgLang, $wgRequest;
442442
443443 if ( !$this->userCanExecute( $wgUser ) ) {
444444 $this->displayRestrictionError();
445445 return;
446446 }
447447
448 - if ( $this->limit == 0 && $this->offset == 0 )
449 - list( $this->limit, $this->offset ) = wfCheckLimits();
 448+ if ( $this->limit == 0 && $this->offset == 0 ) {
 449+ list( $this->limit, $this->offset ) = $wgRequest->getLimitOffset();
 450+ }
450451 $dbr = wfGetDB( DB_SLAVE );
451452
452453 $this->setHeaders();

Status & tagging log