aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-31 20:58:05 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-31 20:58:05 -0700
commit039f56f390c69ad0aedadcca3d611fea0d9eebf9 (patch)
tree757f0ce289961e3efa2441a9a625872aa34b3815 /mod/import.php
parentb4cbb3aeb1b7b383966bd8ca36d8a2f2fa608f0b (diff)
downloadvolse-hubzilla-039f56f390c69ad0aedadcca3d611fea0d9eebf9.tar.gz
volse-hubzilla-039f56f390c69ad0aedadcca3d611fea0d9eebf9.tar.bz2
volse-hubzilla-039f56f390c69ad0aedadcca3d611fea0d9eebf9.zip
mostly doc tweaks, some import/export work
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/mod/import.php b/mod/import.php
index bf1f0ca2e..fb04a021a 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -447,7 +447,7 @@ function import_post(&$a) {
-// FIXME - ensure we have an xchan if somebody is trying to pull a fast one
+ // FIXME - ensure we have an xchan if somebody is trying to pull a fast one
if($completed < 8) {
$friends = 0;
@@ -556,6 +556,23 @@ function import_post(&$a) {
ref_session_write(session_id(), serialize($_SESSION));
}
+
+ $objs = $data['obj'];
+ if($objs) {
+ foreach($objs as $obj) {
+ unset($obj['obj_id']);
+ $obj['channel'] = $channel['channel_id'];
+
+ dbesc_array($obj);
+ $r = dbq("INSERT INTO obj (`"
+ . implode("`, `", array_keys($obj))
+ . "`) VALUES ('"
+ . implode("', '", array_values($obj))
+ . "')" );
+ }
+ }
+
+
$saved_notification_flags = notifications_off($channel['channel_id']);
if($import_posts && array_key_exists('item',$data) && $data['item']) {
@@ -614,7 +631,7 @@ function import_post(&$a) {
-// FIXME - ensure we have a self entry if somebody is trying to pull a fast one
+ // FIXME - ensure we have a self entry if somebody is trying to pull a fast one
// send out refresh requests
// notify old server that it may no longer be primary.