X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryCategories.php;h=79347e625a300e5d86d38eac2a188b2ad54eb68d;hb=95797de3d623d5a5f48cf82edf502a2296bdc257;hp=f728dc5fa8e62207c91160078d74abf84aa0032d;hpb=c9a71813b828b22c3ea58c16731449dca3eacd53;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php index f728dc5fa8..79347e625a 100644 --- a/includes/api/ApiQueryCategories.php +++ b/includes/api/ApiQueryCategories.php @@ -1,9 +1,5 @@ @gmail.com" * * This program is free software; you can redistribute it and/or modify @@ -90,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 " . @@ -131,6 +127,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase { 'cl_to' . $sort ] ); } + $this->addOption( 'LIMIT', $params['limit'] + 1 ); $res = $this->select( __METHOD__ );