diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-01-18 11:05:18 +0100 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2011-01-18 11:05:18 +0100 |
commit | 8b997791819ba419e7e2ceb7861bb0e3e37d87dd (patch) | |
tree | 78b75c13632e9fcaa32f281fb23dcfcd841cf0e1 /update.php | |
parent | b5c9f80919bd8678521c31913eeb08ccc56914dd (diff) | |
parent | 028460a5c1de4833bb1dcfaa945c1292952bf923 (diff) | |
download | volse-hubzilla-8b997791819ba419e7e2ceb7861bb0e3e37d87dd.tar.gz volse-hubzilla-8b997791819ba419e7e2ceb7861bb0e3e37d87dd.tar.bz2 volse-hubzilla-8b997791819ba419e7e2ceb7861bb0e3e37d87dd.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/update.php b/update.php index ae0e35531..7aacffb40 100644 --- a/update.php +++ b/update.php @@ -302,3 +302,18 @@ function update_1030() { } +function update_1031() { + // Repair any bad links that slipped into the item table + $r = q("SELECT `id`, `object` FROM `item` WHERE `object` != '' "); + if($r && count($r)) { + foreach($r as $rr) { + if(strstr($rr['object'],'type="http')) { + q("UPDATE `item` SET `object` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(str_replace('type="http','href="http',$rr['object'])), + intval($rr['id']) + ); + } + } + } +} + |