aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-02-24 21:43:15 -0800
committerzotlabs <mike@macgirvin.com>2019-02-24 21:43:15 -0800
commit1ff97754afee87f23b17a6b036ebe9e69d41a7c6 (patch)
treebe179ff0fbc801ee2f2ec733b72c39e2d42fb3cb
parent20e43311db8f320ac6eeb094c27210885637240d (diff)
downloadvolse-hubzilla-1ff97754afee87f23b17a6b036ebe9e69d41a7c6.tar.gz
volse-hubzilla-1ff97754afee87f23b17a6b036ebe9e69d41a7c6.tar.bz2
volse-hubzilla-1ff97754afee87f23b17a6b036ebe9e69d41a7c6.zip
issues uncovered testing combined item/file import
-rw-r--r--include/api_zot.php4
-rw-r--r--include/channel.php4
-rw-r--r--include/text.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/api_zot.php b/include/api_zot.php
index d2cadc9a4..b332aea71 100644
--- a/include/api_zot.php
+++ b/include/api_zot.php
@@ -95,9 +95,9 @@
if(! $_REQUEST['since'])
$start = NULL_DATE;
else {
- $start = datetime_convert('UTC','UTC', $_REQUEST['since']);
+ $start = datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['since']);
}
- $finish = datetime_convert('UTC','UTC', (($_REQUEST['until']) ? $_REQUEST['until'] : 'now'));
+ $finish = datetime_convert(date_default_timezone_get(),'UTC', (($_REQUEST['until']) ? $_REQUEST['until'] : 'now'));
json_return_and_die(channel_export_items_page(api_user(),$start,$finish,$page,$records));
}
diff --git a/include/channel.php b/include/channel.php
index 3de293ab2..466d2eab9 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1207,8 +1207,8 @@ function channel_export_items_page($channel_id, $start, $finish, $page = 0, $lim
$r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and resource_type = '' and created >= '%s' and created <= '%s' order by created limit %d offset %d",
intval(ITEM_TYPE_POST),
intval($channel_id),
- intval($start),
- intval($finish),
+ dbesc($start),
+ dbesc($finish),
intval($limit),
intval($offset)
);
diff --git a/include/text.php b/include/text.php
index b017b038a..6dac5ccc7 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3241,7 +3241,7 @@ function flatten_array_recursive($arr) {
$ret = array_merge($ret, $tmp);
}
}
- elseif($a) {
+ elseif(isset($a)) {
$ret[] = $a;
}
}