Changed function that will be private in the future

pull/608/head
Michael 2018-05-29 05:24:25 +00:00
parent 8047969799
commit 5c668bd6e9
1 changed files with 8 additions and 14 deletions

View File

@ -1042,21 +1042,15 @@ function pumpio_get_contact($uid, $contact, $no_insert = false) {
function pumpio_dodelete(&$a, $uid, $self, $post, $own_id) { function pumpio_dodelete(&$a, $uid, $self, $post, $own_id) {
// Two queries for speed issues // Two queries for speed issues
$r = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", $condition = ['uri' => $post->object->id, 'uid' => $uid];
dbesc($post->object->id), if (dba::exists('item', $condition)) {
intval($uid) return Item::delete($condition);
); }
if (count($r)) $condition = ['extid' => $post->object->id, 'uid' => $uid];
return Item::deleteById($r[0]["id"]); if (dba::exists('item', $condition)) {
return Item::delete($condition);
$r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1", }
dbesc($post->object->id),
intval($uid)
);
if (count($r))
return Item::deleteById($r[0]["id"]);
} }
function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcompletion = true) { function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcompletion = true) {