aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Import.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-21 18:18:06 -0700
committerredmatrix <git@macgirvin.com>2016-06-21 18:24:36 -0700
commitb593c3a9b90bc35e7bfa320acffb63b9b0f3de93 (patch)
tree3e6d54e3e23b17709c4f5d1c94abccd106cb95ed /Zotlabs/Module/Import.php
parent63423c8ee1f750d855c75ed67205076d21eda4f1 (diff)
downloadvolse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.tar.gz
volse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.tar.bz2
volse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.zip
1. provide automatic relocation of important links in items that are imported or synced to clones
2. provide framework for custom curl request bodies using custom/non-standard request methods. This was a real nightmare because curl doesn't actually let you specify a string to send as the request body (except when doing POST). You have to treat it as a file upload using a custom file handler function which provides the actual content in chunks as if it were buffered I/O. 3. item_store and item_store_update now return the item that was stored
Diffstat (limited to 'Zotlabs/Module/Import.php')
-rw-r--r--Zotlabs/Module/Import.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php
index 122e27e90..4a559fe95 100644
--- a/Zotlabs/Module/Import.php
+++ b/Zotlabs/Module/Import.php
@@ -131,6 +131,8 @@ class Import extends \Zotlabs\Web\Controller {
// import channel
+ $relocate = ((array_key_exists('relocate',$data)) ? $data['relocate'] : null);
+
if(array_key_exists('channel',$data)) {
if($completed < 1) {
@@ -475,7 +477,7 @@ class Import extends \Zotlabs\Web\Controller {
import_events($channel,$data['event']);
if(is_array($data['event_item']))
- import_items($channel,$data['event_item']);
+ import_items($channel,$data['event_item'],false,$relocate);
if(is_array($data['menu']))
import_menus($channel,$data['menu']);
@@ -486,7 +488,7 @@ class Import extends \Zotlabs\Web\Controller {
$saved_notification_flags = notifications_off($channel['channel_id']);
if($import_posts && array_key_exists('item',$data) && $data['item'])
- import_items($channel,$data['item']);
+ import_items($channel,$data['item'],false,$relocate);
notifications_on($channel['channel_id'],$saved_notification_flags);