repair any bad links in activity objects
This commit is contained in:
parent
710cb7d13c
commit
050618a2b6
4
boot.php
4
boot.php
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
define ( 'BUILD_ID', 1031 );
|
define ( 'BUILD_ID', 1032 );
|
||||||
define ( 'FRIENDIKA_VERSION', '2.01.1002' );
|
define ( 'FRIENDIKA_VERSION', '2.01.1003' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
|
||||||
|
|
||||||
define ( 'EOL', "<br />\r\n" );
|
define ( 'EOL', "<br />\r\n" );
|
||||||
|
|
15
update.php
15
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'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue