aboutsummaryrefslogtreecommitdiffstats
path: root/include/api_zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-06 21:11:39 -0800
committerzotlabs <mike@macgirvin.com>2016-12-06 21:11:39 -0800
commitb3963456c00a52c041689b49213feccf978e0ec5 (patch)
treee97867ad58c81db5f20a96b39f340cc246dfbddd /include/api_zot.php
parentbccf371aa970776e04617760f994f86695bff56a (diff)
downloadvolse-hubzilla-b3963456c00a52c041689b49213feccf978e0ec5.tar.gz
volse-hubzilla-b3963456c00a52c041689b49213feccf978e0ec5.tar.bz2
volse-hubzilla-b3963456c00a52c041689b49213feccf978e0ec5.zip
attach_list_files bugfix
Diffstat (limited to 'include/api_zot.php')
-rw-r--r--include/api_zot.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/api_zot.php b/include/api_zot.php
index 35025f5f8..bdbed6a5f 100644
--- a/include/api_zot.php
+++ b/include/api_zot.php
@@ -124,7 +124,13 @@
$start = ((array_key_exists('start',$_REQUEST)) ? intval($_REQUEST['start']) : 0);
$records = ((array_key_exists('records',$_REQUEST)) ? intval($_REQUEST['records']) : 0);
- json_return_and_die(attach_list_files(api_user(),get_observer_hash(),$hash,$filename,$filetype,'created asc',$start,$records));
+ $x = attach_list_files(api_user(),get_observer_hash(),$hash,$filename,$filetype,'created asc',$start,$records);
+ if($start || $records) {
+ $x['start'] = $start;
+ $x['records'] = count($x['results']);
+ }
+
+ json_return_and_die($x);
}