mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 13:03:42 +00:00
[pumpio] Rename Item::delete to Item::markForDeletion
This commit is contained in:
parent
8b17ea90c4
commit
acc013f287
1 changed files with 3 additions and 3 deletions
|
@ -914,7 +914,7 @@ function pumpio_dounlike(App $a, $uid, $self, $post, $own_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item::delete(['verb' => Activity::LIKE, 'uid' => $uid, 'contact-id' => $contactid, 'thr-parent' => $orig_post['uri']]);
|
Item::markForDeletion(['verb' => Activity::LIKE, 'uid' => $uid, 'contact-id' => $contactid, 'thr-parent' => $orig_post['uri']]);
|
||||||
|
|
||||||
if (DBA::isResult($r)) {
|
if (DBA::isResult($r)) {
|
||||||
Logger::log("pumpio_dounlike: unliked existing like. User ".$own_id." ".$uid." Contact: ".$contactid." Url ".$orig_post['uri']);
|
Logger::log("pumpio_dounlike: unliked existing like. User ".$own_id." ".$uid." Contact: ".$contactid." Url ".$orig_post['uri']);
|
||||||
|
@ -1082,13 +1082,13 @@ function pumpio_dodelete(App $a, $uid, $self, $post, $own_id)
|
||||||
// Two queries for speed issues
|
// Two queries for speed issues
|
||||||
$condition = ['uri' => $post->object->id, 'uid' => $uid];
|
$condition = ['uri' => $post->object->id, 'uid' => $uid];
|
||||||
if (Item::exists($condition)) {
|
if (Item::exists($condition)) {
|
||||||
Item::delete($condition);
|
Item::markForDeletion($condition);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$condition = ['extid' => $post->object->id, 'uid' => $uid];
|
$condition = ['extid' => $post->object->id, 'uid' => $uid];
|
||||||
if (Item::exists($condition)) {
|
if (Item::exists($condition)) {
|
||||||
Item::delete($condition);
|
Item::markForDeletion($condition);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue