aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2020-08-23 19:17:23 +0200
committerMario Vavti <mario@mariovavti.com>2020-08-23 19:17:23 +0200
commitc53794a8a2bd4c6100d4c5f8e7785c8436b454fa (patch)
treec3eefbf7d7f3bb0d926f0136ebf01eaf42d8023d /Zotlabs/Update
parent170b2e4465951edff5019545045714aa660cad51 (diff)
downloadvolse-hubzilla-c53794a8a2bd4c6100d4c5f8e7785c8436b454fa.tar.gz
volse-hubzilla-c53794a8a2bd4c6100d4c5f8e7785c8436b454fa.tar.bz2
volse-hubzilla-c53794a8a2bd4c6100d4c5f8e7785c8436b454fa.zip
an attempt to fix update 1238 for older hubs with broken xchan entries
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r--Zotlabs/Update/_1238.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/Zotlabs/Update/_1238.php b/Zotlabs/Update/_1238.php
index 32c21f161..2a10e594f 100644
--- a/Zotlabs/Update/_1238.php
+++ b/Zotlabs/Update/_1238.php
@@ -12,6 +12,9 @@ class _1238 {
dbesc('Premium Channel')
);
+ // completely remove broken xchan entries
+ $r = dbq("DELETE FROM xchan WHERE xchan_hash = ''");
+
// fix legacy zot hubloc_id_url
$r1 = dbq("UPDATE hubloc
SET hubloc_id_url = CONCAT(hubloc_url, '/channel/', SUBSTRING(hubloc_addr FROM 1 FOR POSITION('@' IN hubloc_addr) -1))
@@ -25,8 +28,7 @@ class _1238 {
$r2 = dbq("UPDATE xchan
SET xchan_url = xchan_hash
WHERE xchan_network = 'activitypub'
- AND xchan_url = ''
- AND xchan_hash != ''"
+ AND xchan_url = ''"
);
$r3 = dbq("UPDATE hubloc
@@ -41,8 +43,7 @@ class _1238 {
$r2 = dbq("UPDATE xchan
SET xchan_url = xchan_hash
WHERE xchan_network = 'activitypub'
- AND xchan_url = ''
- AND xchan_hash != ''"
+ AND xchan_url = ''"
);
$r3 = dbq("UPDATE hubloc