Fix missing limit

This commit is contained in:
Laurent Destailleur 2023-04-25 21:16:56 +02:00
parent c891196b5b
commit 388ba8f399

View File

@ -28,13 +28,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
*/ */
class MultiCurrencies extends DolibarrApi class MultiCurrencies extends DolibarrApi
{ {
/** /**
* Constructor * Constructor
*/ */
public function __construct() public function __construct()
{ {
global $db, $conf; global $db;
$this->db = $db; $this->db = $db;
} }
@ -45,14 +45,15 @@ class MultiCurrencies extends DolibarrApi
* *
* @param string $sortfield Sort field * @param string $sortfield Sort field
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @param int $limit Limit for list
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.product_id:=:1) and (t.date_creation:<:'20160101')" * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.product_id:=:1) and (t.date_creation:<:'20160101')"
* @return array Array of warehouse objects * @return array Array of warehouse objects
* *
* @throws RestException * @throws RestException
*/ */
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $sqlfilters = '') public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $sqlfilters = '')
{ {
global $db, $conf; global $db;
$obj_ret = array(); $obj_ret = array();
@ -355,7 +356,7 @@ class MultiCurrencies extends DolibarrApi
/** /**
* Clean sensible MultiCurrencyRate object datas * Clean sensible MultiCurrencyRate object datas
* *
* @param MultiCurrencyRate $object Object to clean * @param MultiCurrency $object Object to clean
* @return Object Object with cleaned properties * @return Object Object with cleaned properties
*/ */
protected function _cleanObjectDatasRate($object) protected function _cleanObjectDatasRate($object)