From 7ce4175876ce13727432dc839938bb8e486ef406 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 12 Apr 2023 09:29:51 +0200 Subject: initial commit directory sync rewrite - should work but still requires lots of cleanup --- Zotlabs/Lib/Libsync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib/Libsync.php') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index d52b501e4..56bb411c4 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -786,7 +786,7 @@ class Libsync { if (isset($arr['locations']) && $arr['locations']) { - $xisting = q("select * from hubloc where hubloc_hash = '%s'", + $xisting = q("select * from hubloc where hubloc_hash = '%s' and hubloc_deleted = 0", dbesc($sender['hash']) ); -- cgit v1.2.3 From 0d3b389538fe25a2cb6cc15fe5a44dd244ee6428 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 12 Apr 2023 13:35:41 +0200 Subject: fix php warning --- Zotlabs/Lib/Libsync.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib/Libsync.php') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 56bb411c4..84117abb0 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -771,7 +771,12 @@ class Libsync { static function sync_locations($sender, $arr) { - $ret = []; + $ret = [ + 'change_message' => '', + 'changed' => false, + 'message' => '' + ]; + $what = ''; $changed = false; -- cgit v1.2.3 From f277d08244986c080d48af3e8bc86a9886d098bc Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 21 Apr 2023 07:45:32 +0000 Subject: queue and poller testing --- Zotlabs/Lib/Libsync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib/Libsync.php') diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php index 84117abb0..0d383c697 100644 --- a/Zotlabs/Lib/Libsync.php +++ b/Zotlabs/Lib/Libsync.php @@ -141,7 +141,7 @@ class Libsync { $total = count($synchubs); foreach ($synchubs as $hub) { - $hash = random_string(); + $hash = new_uuid(); $n = Libzot::build_packet($channel, 'sync', $env_recips, json_encode($info), 'hz', $hub['hubloc_sitekey'], $hub['site_crypto']); Queue::insert([ 'hash' => $hash, -- cgit v1.2.3