aboutsummaryrefslogtreecommitdiffstats
path: root/update.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-17 16:28:32 -0800
committerFriendika <info@friendika.com>2011-01-17 16:28:32 -0800
commit050618a2b690ad2e2d8e84afbada8b12f9da0f01 (patch)
tree160f26484c66a314fc9c6ba6a4a8ebd363973181 /update.php
parent710cb7d13c005b244cf50d2f33479b68596d1330 (diff)
downloadvolse-hubzilla-050618a2b690ad2e2d8e84afbada8b12f9da0f01.tar.gz
volse-hubzilla-050618a2b690ad2e2d8e84afbada8b12f9da0f01.tar.bz2
volse-hubzilla-050618a2b690ad2e2d8e84afbada8b12f9da0f01.zip
repair any bad links in activity objects
Diffstat (limited to 'update.php')
-rw-r--r--update.php15
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=&quot;http')) {
+ q("UPDATE `item` SET `object` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc(str_replace('type=&quot;http','href=&quot;http',$rr['object'])),
+ intval($rr['id'])
+ );
+ }
+ }
+ }
+}
+