Skip to content

Commit 64c5c99

Browse files
authored
Merge pull request #2681 from desaerun/patch-3
add 'start' parameter to getusertransactions api page
2 parents 02581f1 + 653729e commit 64c5c99

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: include/pages/api/getusertransactions.inc.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@
88
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
99

1010
// Fetch transactions
11+
if (isset($_REQUEST['start'])) {
12+
$start = $_REQUEST['start'];
13+
} else {
14+
// start at the beginning
15+
$start = 0;
16+
}
1117
if (isset($_REQUEST['limit']) && $_REQUEST['limit'] <= 100) {
1218
$limit = $_REQUEST['limit'];
1319
} else {
1420
// Force limit
1521
$limit = 100;
1622
}
17-
$data['transactions'] = $transaction->getTransactions(0, NULL, $limit, $user_id);
23+
24+
$data['transactions'] = $transaction->getTransactions($start, NULL, $limit, $user_id);
1825

1926
// Fetch summary if enabled
2027
if (!$setting->getValue('disable_transactionsummary')) {

0 commit comments

Comments
 (0)