fix diaspora_retraction
This commit is contained in:
parent
bcc9057d8c
commit
5042847334
@ -1966,19 +1966,16 @@ function diaspora_retraction($importer,$xml) {
|
|||||||
|
|
||||||
if($type === 'Person') {
|
if($type === 'Person') {
|
||||||
require_once('include/Contact.php');
|
require_once('include/Contact.php');
|
||||||
contact_remove($contact['id']);
|
contact_remove($importer['channel_id'],$contact['abook_id']);
|
||||||
}
|
}
|
||||||
elseif($type === 'Post') {
|
elseif($type === 'Post') {
|
||||||
$r = q("select * from item where guid = '%s' and uid = %d and not file like '%%[%%' limit 1",
|
$r = q("select * from item where mid = '%s' and uid = %d limit 1",
|
||||||
dbesc('guid'),
|
dbesc('guid'),
|
||||||
intval($importer['channel_id'])
|
intval($importer['channel_id'])
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if(link_compare($r[0]['author-link'],$contact['url'])) {
|
if(link_compare($r[0]['author_xchan'],$contact['xchan_hash'])) {
|
||||||
q("update item set `deleted` = 1, `changed` = '%s' where `id` = %d",
|
drop_item($r[0]['id'],false);
|
||||||
dbesc(datetime_convert()),
|
|
||||||
intval($r[0]['id'])
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user