diff options
Diffstat (limited to 'include/channel.php')
-rw-r--r-- | include/channel.php | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/include/channel.php b/include/channel.php index 71fad5222..d610a0b9a 100644 --- a/include/channel.php +++ b/include/channel.php @@ -929,12 +929,22 @@ function identity_basic_export($channel_id, $sections = null, $zap_compat = fals $ret['abook'] = $r; for($x = 0; $x < count($ret['abook']); $x ++) { - + $xchans[] = $ret['abook'][$x]['abook_xchan']; $my_perms = []; $their_perms = []; $newconfig = []; $abconfig = load_abconfig($channel_id,$ret['abook'][$x]['abook_xchan']); + + // Partly revert of commit 85cf25a2a8bfbbfe10de485d4affd54626fbbfa4 + if($abconfig) { + $ret['abook'][$x]['abconfig'] = $abconfig; + } + + /* This was added in commit 85cf25a2a8bfbbfe10de485d4affd54626fbbfa4 + * Seems unfinished work on zap compatibility for cloning. + * It breaks cloning of abconfig for hubzilla - reverted to the above code. + if($abconfig) { foreach ($abconfig as $abc) { @@ -951,24 +961,28 @@ function identity_basic_export($channel_id, $sections = null, $zap_compat = fals } $newconfig[] = $abc; } - + $ret['abook'][$x]['abconfig'] = $newconfig; + if ($zap_compat) { $ret['abook'][$x]['abconfig'][] = [ 'chan' => $channel_id, 'xchan' => $ret['abook'][$x]['abook_chan'], 'cat' => 'system', 'k' => 'my_perms', 'v' => implode(',',$my_perms) ]; $ret['abook'][$x]['abconfig'][] = [ 'chan' => $channel_id, 'xchan' => $ret['abook'][$x]['abook_chan'], 'cat' => 'system', 'k' => 'their_perms', 'v' => implode(',',$their_perms) ]; - } + } } + */ translate_abook_perms_outbound($ret['abook'][$x]); - + } - // pick up the zot6 xchan and hublocs also - + + + // pick up the zot xchan and hublocs also + if($ret['channel']['channel_portable_id']) { $xchans[] = $ret['channel']['channel_portable_id']; } - + stringify_array_elms($xchans); } @@ -1801,7 +1815,7 @@ function advanced_profile() { $profile['howlong'] = relative_date(App::$profile['howlong'], t('for %1$d %2$s')); } - if(App::$profile['keywords']) { + if(App::$profile['keywords']) { $keywords = str_replace(',',' ', App::$profile['keywords']); $keywords = str_replace(' ',' ', $keywords); $karr = explode(' ', $keywords); @@ -2856,7 +2870,7 @@ function channel_remove($channel_id, $local = true, $unset_session = false) { attach_delete($channel_id,$rv['hash']); } } - + $r = q("select id from item where uid = %d", intval($channel_id)); if($r) { foreach($r as $rv) { @@ -2939,7 +2953,7 @@ function channel_remove_final($channel_id) { q("delete from abook where abook_channel = %d", intval($channel_id)); q("delete from abconfig where chan = %d", intval($channel_id)); q("delete from pconfig where uid = %d", intval($channel_id)); - + } |