X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fapi%2FApiQueryCategories.php;h=79347e625a300e5d86d38eac2a188b2ad54eb68d;hp=7b447cb942af28591d5195a757aceac96a089e94;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hpb=43d159d469e9cbe4050266c1f05a84559bd24dc1 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__ );