From 653729e6dc154363d88abe3c794f2ecdb2fc1c11 Mon Sep 17 00:00:00 2001 From: desaerun <34751248+desaerun@users.noreply.github.com> Date: Tue, 27 Feb 2018 23:12:45 -0700 Subject: [PATCH] add 'start' parameter to getusertransactions api page sets db start row --- include/pages/api/getusertransactions.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/pages/api/getusertransactions.inc.php b/include/pages/api/getusertransactions.inc.php index 62f60e19f..956ca6684 100644 --- a/include/pages/api/getusertransactions.inc.php +++ b/include/pages/api/getusertransactions.inc.php @@ -8,13 +8,20 @@ $user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']); // Fetch transactions +if (isset($_REQUEST['start'])) { + $start = $_REQUEST['start']; +} else { + // start at the beginning + $start = 0; +} if (isset($_REQUEST['limit']) && $_REQUEST['limit'] <= 100) { $limit = $_REQUEST['limit']; } else { // Force limit $limit = 100; } -$data['transactions'] = $transaction->getTransactions(0, NULL, $limit, $user_id); + +$data['transactions'] = $transaction->getTransactions($start, NULL, $limit, $user_id); // Fetch summary if enabled if (!$setting->getValue('disable_transactionsummary')) {