aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-12 11:28:48 +0000
committerMario <mario@mariovavti.com>2023-01-12 11:28:48 +0000
commit8a7b22141239969b3af39582019dfa455612bb41 (patch)
treec11f0c47d5a13bb3e0b6b19494853cca1510fa5e /Zotlabs
parentd092e79ebcfd34c71cc50f2d676eb097482e4d91 (diff)
downloadvolse-hubzilla-8a7b22141239969b3af39582019dfa455612bb41.tar.gz
volse-hubzilla-8a7b22141239969b3af39582019dfa455612bb41.tar.bz2
volse-hubzilla-8a7b22141239969b3af39582019dfa455612bb41.zip
mark old hubloc entries from re-installed hubs deleted if we discover any
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Libsync.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index f844c63b5..19361c4ae 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -862,7 +862,9 @@ class Libsync {
);
}
- // update connection timestamp if this is the site we're talking to
+ // Update connection timestamp if this is the site we're talking to.
+ // Also mark all entries from the current site with different sitekeys
+ // deleted (the site has been re-installed)
// This only happens when called from import_xchan
$current_site = false;
@@ -876,6 +878,12 @@ class Libsync {
intval($r[0]['hubloc_id']),
dbesc($t)
);
+
+ q("update hubloc set hubloc_error = 1, hubloc_deleted = 1 where hubloc_url = '%s' and hubloc_sitekey != '%s'",
+ dbesc($r[0]['hubloc_url']),
+ dbesc($r[0]['hubloc_sitekey'])
+ );
+
$current_site = true;
}