diff --git a/include/like.php b/include/like.php index 31698658a..8b8759c2f 100644 --- a/include/like.php +++ b/include/like.php @@ -151,7 +151,7 @@ function do_like($item_id, $verb) { AND (`parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1", intval($author_contact['id']), - intval($uid), + intval($item['uid']), dbesc($item_id), dbesc($item_id), dbesc($item['uri']) ); @@ -210,8 +210,8 @@ EOT; $new_item = array( 'guid' => get_guid(32), - 'uri' => item_new_uri($a->get_hostname(), $uid), - 'uid' => $uid, + 'uri' => item_new_uri($a->get_hostname(), $item['uid']), + 'uid' => $item['uid'], 'contact-id' => $item_contact_id, 'type' => 'activity', 'wall' => $item['wall'], diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 78daae275..5c86a95ef 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -154,12 +154,10 @@ class Notifier { FROM `item` LEFT JOIN `sign` ON `sign`.`iid` = `item`.`id` WHERE `parent` = %d AND visible AND NOT moderated ORDER BY `id` ASC", intval($parent_id) ); -logger('Blubb: a-'.$item_id); if (!count($items)) { return; } -logger('Blubb: b-'.$item_id); // avoid race condition with deleting entries if ($items[0]['deleted']) { @@ -173,13 +171,11 @@ logger('Blubb: b-'.$item_id); $top_level = true; } } -logger('Blubb: 0-'.$item_id.' - '.$uid); $owner = User::getOwnerDataById($uid); if (!$owner) { return; } -logger('Blubb: 1-'.$item_id); $walltowall = ($top_level && ($owner['id'] != $items[0]['contact-id']) ? true : false); @@ -197,14 +193,12 @@ logger('Blubb: 1-'.$item_id); // fill this in with a single salmon slap if applicable $slap = ''; -logger('Blubb: 2-'.$item_id); if (! ($mail || $fsuggest || $relocate)) { $slap = OStatus::salmon($target_item, $owner); $parent = $items[0]; -logger('Blubb: 3-'.$item_id); $thr_parent = q("SELECT `network`, `author-link`, `owner-link` FROM `item` WHERE `uri` = '%s' AND `uid` = %d", dbesc($target_item["thr-parent"]), intval($target_item["uid"]));