diff options
author | Mario <mario@mariovavti.com> | 2023-03-19 13:55:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-03-19 13:55:18 +0000 |
commit | 89285f1408d21091bb80d45b391ddcbe06ba8d0f (patch) | |
tree | b2eb07d9f3d91d77f89a4565a58e6e5231b20c1c /Zotlabs/Lib/Libsync.php | |
parent | 0a679e503ef367eda3085c44af103ee53869a94f (diff) | |
parent | 17c0bb2069dcfe35d3febc5bfdb3a7295f15d49c (diff) | |
download | volse-hubzilla-89285f1408d21091bb80d45b391ddcbe06ba8d0f.tar.gz volse-hubzilla-89285f1408d21091bb80d45b391ddcbe06ba8d0f.tar.bz2 volse-hubzilla-89285f1408d21091bb80d45b391ddcbe06ba8d0f.zip |
Merge branch '8.2RC'8.2
Diffstat (limited to 'Zotlabs/Lib/Libsync.php')
-rw-r--r-- | Zotlabs/Lib/Libsync.php | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 19361c4ae..d52b501e4 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -766,11 +766,10 @@ class Libsync { * * @param array $sender * @param array $arr - * @param boolean $absolute (optional) default false * @return array */ - static function sync_locations($sender, $arr, $absolute = false) { + static function sync_locations($sender, $arr) { $ret = []; $what = ''; @@ -787,9 +786,6 @@ class Libsync { if (isset($arr['locations']) && $arr['locations']) { - if ($absolute) - Libzot::check_location_move($sender['hash'], $arr['locations']); - $xisting = q("select * from hubloc where hubloc_hash = '%s'", dbesc($sender['hash']) ); @@ -933,14 +929,7 @@ class Libsync { $what .= 'primary_hub '; $changed = true; } - elseif ($absolute) { - // Absolute sync - make sure the current primary is correctly reflected in the xchan - $pr = hubloc_change_primary($r[0]); - if ($pr) { - $what .= 'xchan_primary '; - $changed = true; - } - } + if (intval($r[0]['hubloc_deleted']) && (!intval($location['deleted']))) { q("update hubloc set hubloc_deleted = 0, hubloc_updated = '%s' where hubloc_id_url = '%s'", dbesc(datetime_convert()), @@ -1009,9 +998,9 @@ class Libsync { } } - // get rid of any hubs we have for this channel which weren't reported. + // get rid of any hublocs we have for this channel which weren't reported. - if ($absolute && $xisting) { + if ($xisting) { foreach ($xisting as $x) { if (!array_key_exists('updated', $x)) { logger('Deleting unreferenced hub location ' . $x['hubloc_addr']); |