diff options
author | zottel <github@zottel.net> | 2014-02-20 11:17:07 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2014-02-20 11:17:07 +0100 |
commit | 79c566bda33645f42f8545fdc6e55af35c4a7d5c (patch) | |
tree | 7fc573bd9903150b938b11758837b02a1d157008 /install/update.php | |
parent | b223b52f83344a7ebdea460cd534d24337f0b403 (diff) | |
parent | d8434bb480ee4f7a94246a8623614a4c3105a2a6 (diff) | |
download | volse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.tar.gz volse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.tar.bz2 volse-hubzilla-79c566bda33645f42f8545fdc6e55af35c4a7d5c.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 18 |
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 |