X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Flike.php;h=1dbdcc936d727fc10fd05969674cfe8feeb06ed6;hb=19c039242cc5314702acb13cb504c160fef2f825;hp=1dcadde705ef93e9885edf07a07af5509e75fa21;hpb=7499824381b3cb4a90f0d126e3eaeb4b3b786cc4;p=friendica.git diff --git a/include/like.php b/include/like.php index 1dcadde705..1dbdcc936d 100644 --- a/include/like.php +++ b/include/like.php @@ -1,10 +1,11 @@ $like_item['id'])); + dba::delete('sign', ['iid' => $like_item['id']]); $like_item_id = $like_item['id']; Worker::add(PRIORITY_HIGH, "Notifier", "like", $like_item_id); @@ -203,7 +209,7 @@ EOT; $alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]'; $plink = '[url=' . System::baseUrl() . '/display/' . $owner_self_contact['nick'] . '/' . $item['id'] . ']' . $post_type . '[/url]'; - $new_item = array( + $new_item = [ 'guid' => get_guid(32), 'uri' => item_new_uri($a->get_hostname(), $item['uid']), 'uid' => $item['uid'], @@ -233,16 +239,14 @@ EOT; 'deny_gid' => $item['deny_gid'], 'visible' => 1, 'unseen' => 1, - 'last-child' => 0 - ); + ]; $new_item_id = item_store($new_item); // @todo: Explain this block if (! $item['visible']) { - q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d AND `uid` = %d", - intval($item['id']), - intval($item['uid']) + q("UPDATE `item` SET `visible` = 1 WHERE `id` = %d", + intval($item['id']) ); } @@ -251,7 +255,7 @@ EOT; $new_item['id'] = $new_item_id; - call_hooks('post_local_end', $new_item); + Addon::callHooks('post_local_end', $new_item); Worker::add(PRIORITY_HIGH, "Notifier", "like", $new_item_id);