aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php56
1 files changed, 25 insertions, 31 deletions
diff --git a/include/channel.php b/include/channel.php
index e2be4d8a8..2d79cd074 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -651,7 +651,7 @@ function change_channel_keys($channel) {
foreach($h as $hv) {
$hv['hubloc_guid_sig'] = $sig;
$hv['hubloc_hash'] = $hash;
- $hv['hubloc_url_sig'] = base64url_encode(rsa_sign(z_root(),$modifed['channel_prvkey']));
+ $hv['hubloc_url_sig'] = base64url_encode(rsa_sign(z_root(),$modified['channel_prvkey']));
hubloc_store_lowlevel($hv);
}
}
@@ -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);
@@ -2573,26 +2587,6 @@ function channel_reddress($channel) {
return strtolower($channel['channel_address'] . '@' . App::get_hostname());
}
-
-/**
- * @brief Get manual channel conversation update config.
- *
- * Check the channel config \e manual_conversation_update, if not set fall back
- * to global system config, defaults to 1 if nothing set.
- *
- * @param int $channel_id
- * @return int
- */
-function channel_manual_conv_update($channel_id) {
-
- $x = get_pconfig($channel_id, 'system', 'manual_conversation_update');
- if($x === false)
- $x = get_config('system', 'manual_conversation_update', 1);
-
- return intval($x);
-}
-
-
/**
* @brief Return parsed HTML remote_login template.
*
@@ -2876,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) {
@@ -2959,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));
-
+
}