From 2c459fefceb5208bba91a3acd64644fb65c78274 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 12 Feb 2023 14:13:59 +0000 Subject: remove deprecated functions --- Zotlabs/Lib/Libsync.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'Zotlabs/Lib/Libsync.php') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 19361c4ae..b0ce7cd12 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()), @@ -1011,10 +1000,10 @@ class Libsync { // get rid of any hubs 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']); + hz_syslog('Deleting unreferenced hub location ' . $x['hubloc_addr']); q("update hubloc set hubloc_deleted = 1, hubloc_updated = '%s' where hubloc_id_url = '%s'", dbesc(datetime_convert()), dbesc($x['hubloc_id_url']) -- cgit v1.2.3