ensure D* photos only attached once
This commit is contained in:
parent
4c0ee7f41f
commit
d0bef869db
|
@ -762,11 +762,13 @@ function diaspora_photo($importer,$xml,$msg) {
|
||||||
|
|
||||||
$link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
|
$link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
|
||||||
|
|
||||||
$r = q("update item set `body` = '%s' where `id` = %d and `uid` = %d limit 1",
|
if(! strstr($parent_item['body'],$link_text)) {
|
||||||
dbesc($link_text . $parent_item['body']),
|
$r = q("update item set `body` = '%s' where `id` = %d and `uid` = %d limit 1",
|
||||||
intval($parent_item['id']),
|
dbesc($link_text . $parent_item['body']),
|
||||||
intval($parent_item['uid'])
|
intval($parent_item['id']),
|
||||||
);
|
intval($parent_item['uid'])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue