aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-15 11:29:45 +0000
committerMario <mario@mariovavti.com>2020-12-17 14:26:00 +0100
commit06aa3e6b8ca66e6bcd06cb4f5bab922d40f83a16 (patch)
treed11b0972a74c2d8cf1d06edcc2cca69304740335 /include
parentabf985c69e902fe008b98a36f4df9e2c08249df4 (diff)
downloadvolse-hubzilla-06aa3e6b8ca66e6bcd06cb4f5bab922d40f83a16.tar.gz
volse-hubzilla-06aa3e6b8ca66e6bcd06cb4f5bab922d40f83a16.tar.bz2
volse-hubzilla-06aa3e6b8ca66e6bcd06cb4f5bab922d40f83a16.zip
fix issue with abconfig when cloning a channel
(cherry picked from commit f13bff2a767cf3a575698f55dad978c7a4cc1a72)
Diffstat (limited to 'include')
-rw-r--r--include/channel.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/channel.php b/include/channel.php
index 88b8c2ceb..d610a0b9a 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -935,6 +935,16 @@ function identity_basic_export($channel_id, $sections = null, $zap_compat = fals
$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) {
@@ -953,17 +963,21 @@ function identity_basic_export($channel_id, $sections = null, $zap_compat = fals
}
$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'];