X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryCategories.php;h=79347e625a300e5d86d38eac2a188b2ad54eb68d;hb=748c5eae2fd5d897c94c48771161c259941a7488;hp=7b447cb942af28591d5195a757aceac96a089e94;hpb=16c80e429be5904fb42a93f260f8de3d18f0c692;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index 7b447cb942..79347e625a 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -86,7 +86,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { $cont = explode( '|', $params['continue'] ); $this->dieContinueUsageIf( count( $cont ) != 2 ); $op = $params['dir'] == 'descending' ? '<' : '>'; - $clfrom = intval( $cont[0] ); + $clfrom = (int)$cont[0]; $clto = $this->getDB()->addQuotes( $cont[1] ); $this->addWhere( "cl_from $op $clfrom OR " . @@ -127,6 +127,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { 'cl_to' . $sort ] ); } + $this->addOption( 'LIMIT', $params['limit'] + 1 ); $res = $this->select( __METHOD__ );