From: Daniel Cannon Date: Wed, 5 Dec 2007 06:32:17 +0000 (+0000) Subject: API: Standardize limits. Use ApiBase constants to avoid similar breakage and inconsis... X-Git-Tag: 1.31.0-rc.0~50538 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=7282f1a3417507460888751ca8f354807cf31a43;p=lhc%2Fweb%2Fwiklou.git API: Standardize limits. Use ApiBase constants to avoid similar breakage and inconsistencies in the future. --- diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 39ae80803e..c37f46c7d9 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -83,8 +83,8 @@ class ApiQueryDeletedrevs extends ApiQueryBase { // This also means stricter limits and stricter restrictions if(!$wgUser->isAllowed('undelete')) $this->dieUsage('You don\'t have permission to view deleted revision content', 'permissiondenied'); - $userMax = 50; - $botMax = 200; + $userMax = ApiBase :: LIMIT_SML1; + $botMax = ApiBase :: LIMIT_SML2; $this->validateLimit('limit', $params['limit'], 1, $userMax, $botMax); } if($fld_token) diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 1c14c8770b..d5a108d4c8 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -119,8 +119,8 @@ class ApiQueryRevisions extends ApiQueryBase { $this->expandTemplates = $expandtemplates; } - $userMax = ($this->fld_content ? 50 : 500); - $botMax = ($this->fld_content ? 200 : 10000); + $userMax = ( $this->fld_content ? ApiBase::LIMIT_SML1 : ApiBase::LIMIT_BIG1 ); + $botMax = ( $this->fld_content ? ApiBase::LIMIT_SML2 : ApiBase::LIMIT_BIG2 ); if ($enumRevMode) {