From eb04dbc5ce2321ca5da4274005bd3e4352cf83fa Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 26 May 2018 21:15:22 +0200 Subject: DB update to fix wrong hubloc_url for activitypub hublocs --- Zotlabs/Update/_1215.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Zotlabs/Update/_1215.php (limited to 'Zotlabs') diff --git a/Zotlabs/Update/_1215.php b/Zotlabs/Update/_1215.php new file mode 100644 index 000000000..3acaab587 --- /dev/null +++ b/Zotlabs/Update/_1215.php @@ -0,0 +1,26 @@ +0"); + + // this will fix peertube hubloc_url + $r2 = q("UPDATE hubloc SET hubloc_url = LEFT(hubloc_url, POSITION('/account' IN hubloc_url)-1) WHERE POSITION('/account' IN hubloc_url)>0"); + + if($r1 && $r2) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + else { + q("ROLLBACK"); + return UPDATE_FAILED; + } + } + +} -- cgit v1.2.3