aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-20 01:44:29 -0800
committerfriendica <info@friendica.com>2014-02-20 01:44:29 -0800
commita7194bc79a83bc7269a20a3c7ff2eb3d368527cb (patch)
tree593a80f81c598b58d279d0eb8bf233d6bde48486 /install
parent6eb971656ef1710596084fdaa0ae3085df2c2101 (diff)
downloadvolse-hubzilla-a7194bc79a83bc7269a20a3c7ff2eb3d368527cb.tar.gz
volse-hubzilla-a7194bc79a83bc7269a20a3c7ff2eb3d368527cb.tar.bz2
volse-hubzilla-a7194bc79a83bc7269a20a3c7ff2eb3d368527cb.zip
fix the broken hublocs in an update
Diffstat (limited to 'install')
-rw-r--r--install/update.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php
index ccfec9ddf..3e39a5b4c 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1097 );
+define( 'UPDATE_VERSION' , 1098 );
/**
*
@@ -1084,3 +1084,19 @@ function update_r1096() {
return UPDATE_FAILED;
}
+function update_r1097() {
+
+ // fix some mangled hublocs from a bug long ago
+
+ $r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%/%'");
+ if($r) {
+ foreach($r as $rr) {
+ q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d limit 1",
+ dbesc(substr($rr['hubloc_addr'],0,strpos($rr['hubloc_addr'],'/'))),
+ intval($rr['hubloc_id'])
+ );
+ }
+ }
+ return UPDATE_SUCCESS;
+
+} \ No newline at end of file