diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-06-08 05:22:01 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-06-08 05:22:01 -0400 |
commit | df2d18160212ec546ec640dd1d2152fecada5557 (patch) | |
tree | 126504df4e5ab2d42defbee153a748fe40253b38 /Zotlabs/Update/_1215.php | |
parent | ed17e8a6499e48b032393be351c39f31a0edcbf3 (diff) | |
parent | 7bf1c5f27b8b8f0eea226e81a5db99585c5a56b3 (diff) | |
download | volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.tar.gz volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.tar.bz2 volse-hubzilla-df2d18160212ec546ec640dd1d2152fecada5557.zip |
Merge branch 'dev' of framagit.org:hubzilla/core into dev
Diffstat (limited to 'Zotlabs/Update/_1215.php')
-rw-r--r-- | Zotlabs/Update/_1215.php | 26 |
1 files changed, 26 insertions, 0 deletions
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 @@ +<?php + +namespace Zotlabs\Update; + +class _1215 { + + function run() { + q("START TRANSACTION"); + + // this will fix mastodon hubloc_url + $r1 = q("UPDATE hubloc SET hubloc_url = LEFT(hubloc_url, POSITION('/users' IN hubloc_url)-1) WHERE POSITION('/users' IN hubloc_url)>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; + } + } + +} |