aboutsummaryrefslogtreecommitdiffstats
path: root/include/api_zot.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-12-12 11:54:26 -0800
committerzotlabs <mike@macgirvin.com>2017-12-12 11:54:26 -0800
commit215d615fc3bb9e168e21a78a6319a7971c4d1e9e (patch)
treeff0af309ef283c48a6f3df5d590068c103d6bf7a /include/api_zot.php
parent979c05b24da0497be582aacaa8b744f692b56ccf (diff)
parentd0956eb39d7a361639f5cd73fb1c3c8463fb1e99 (diff)
downloadvolse-hubzilla-215d615fc3bb9e168e21a78a6319a7971c4d1e9e.tar.gz
volse-hubzilla-215d615fc3bb9e168e21a78a6319a7971c4d1e9e.tar.bz2
volse-hubzilla-215d615fc3bb9e168e21a78a6319a7971c4d1e9e.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/api_zot.php')
-rw-r--r--include/api_zot.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/api_zot.php b/include/api_zot.php
index aaa9ee497..54f905b4c 100644
--- a/include/api_zot.php
+++ b/include/api_zot.php
@@ -150,7 +150,11 @@
$start = ((array_key_exists('start',$_REQUEST)) ? intval($_REQUEST['start']) : 0);
$records = ((array_key_exists('records',$_REQUEST)) ? intval($_REQUEST['records']) : 0);
- $x = attach_list_files(api_user(),get_observer_hash(),$hash,$filename,$filetype,'created asc',$start,$records);
+ $since = ((array_key_exists('since',$_REQUEST)) ? datetime_convert(date_default_timezone_get(),'UTC',$_REQUEST['since']) : NULL_DATE);
+ $until = ((array_key_exists('until',$_REQUEST)) ? datetime_convert(date_default_timezone_get(),'UTC',$_REQUEST['until']) : datetime_convert());
+
+ $x = attach_list_files(api_user(),get_observer_hash(),$hash,$filename,$filetype,'created asc',$start,$records, $since, $until);
+
if($start || $records) {
$x['start'] = $start;
$x['records'] = count($x['results']);
@@ -226,7 +230,10 @@
if(! $_REQUEST['file_id'])
return false;
- $ret = attach_export_data(api_user(),$_REQUEST['file_id']);
+ $channel = channelx_by_n(api_user());
+
+ $ret = attach_export_data($channel,$_REQUEST['file_id']);
+
if($ret) {
json_return_and_die($ret);
}