From 9c65d2824418f831a2a903163d260924bb51b262 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 8 Jan 2021 13:53:28 -0800 Subject: [PATCH] import/export issues --- Zotlabs/Module/Uexport.php | 13 +++++++------ boot.php | 2 +- include/items.php | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Zotlabs/Module/Uexport.php b/Zotlabs/Module/Uexport.php index f6fdf6658..7bea295a1 100644 --- a/Zotlabs/Module/Uexport.php +++ b/Zotlabs/Module/Uexport.php @@ -10,10 +10,10 @@ class Uexport extends Controller { if (! local_channel()) { return; } - - if (argc() > 1) { - $sections = (($_REQUEST['sections']) ? explode(',',$_REQUEST['sections']) : ''); + $sections = (($_REQUEST['sections']) ? explode(',',$_REQUEST['sections']) : get_default_export_sections()); + + if (argc() > 1) { $channel = App::get_channel(); @@ -28,20 +28,21 @@ class Uexport extends Controller { header('content-type: application/json'); header('Content-Disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.json"' ); + $flags = ((version_compare(PHP_VERSION,'7.2.0') >= 0) ? JSON_INVALID_UTF8_SUBSTITUTE : 0); + if ($year) { - echo json_encode(identity_export_year(local_channel(),$year,$month)); + echo json_encode(identity_export_year(local_channel(),$year,$month), $flags); killme(); } if (argc() > 1 && argv(1) === 'basic') { - echo json_encode(identity_basic_export(local_channel(),$sections)); + echo json_encode(identity_basic_export(local_channel(),$sections), $flags); killme(); } // Warning: this option may consume a lot of memory if(argc() > 1 && argv(1) === 'complete') { - $sections = get_default_export_sections(); $sections[] = 'items'; echo json_encode(identity_basic_export(local_channel(),$sections)); killme(); diff --git a/boot.php b/boot.php index 1bccb134b..61c468993 100755 --- a/boot.php +++ b/boot.php @@ -16,7 +16,7 @@ use Zotlabs\Daemon\Run; * @brief This file defines some global constants and includes the central App class. */ -define ( 'STD_VERSION', '20.12.24' ); +define ( 'STD_VERSION', '21.01.09' ); define ( 'ZOT_REVISION', '6.0' ); define ( 'DB_UPDATE_VERSION', 1247 ); diff --git a/include/items.php b/include/items.php index ed50e607d..3cdf5d694 100644 --- a/include/items.php +++ b/include/items.php @@ -2997,6 +2997,8 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false // $mention = '@[zrl=' . $item['author']['xchan_url'] . ']' . $item['author']['xchan_name'] . '[/zrl]'; $arr['body'] = $bb; + $arr['term'] = $item['term']; + $arr['author_xchan'] = $channel['channel_hash']; $arr['owner_xchan'] = $channel['channel_hash'];