diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 22:27:09 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-01 22:27:09 -0700 |
commit | d105f324afefa138683094a05b056dd25122a76a (patch) | |
tree | 299447e6602c9b77134d73f44106a7fc668e1bb6 /mod | |
parent | 23213a91eddd8ae6ca04a1e345153e9740ecd5e4 (diff) | |
download | volse-hubzilla-d105f324afefa138683094a05b056dd25122a76a.tar.gz volse-hubzilla-d105f324afefa138683094a05b056dd25122a76a.tar.bz2 volse-hubzilla-d105f324afefa138683094a05b056dd25122a76a.zip |
import apps
Diffstat (limited to 'mod')
-rw-r--r-- | mod/import.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mod/import.php b/mod/import.php index e8e4f7a3d..0472abfcd 100644 --- a/mod/import.php +++ b/mod/import.php @@ -586,6 +586,29 @@ function import_post(&$a) { } } + $apps = $data['app']; + if($app) { + foreach($apps as $app) { + + unset($app['id']); + unset($app['app_channel']); + + $app['app_channel'] = $channel['channel_id']; + + if($app['app_photo']) { + $x = import_xchan_photo($app['app_photo'],get_observer_hash(),true); + $app['app_photo'] = $x[0]; + } + + dbesc_array($app); + $r = dbq("INSERT INTO app (`" + . implode("`, `", array_keys($obj)) + . "`) VALUES ('" + . implode("', '", array_values($obj)) + . "')" ); + } + } + $saved_notification_flags = notifications_off($channel['channel_id']); |