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'])
);
$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'],
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']) {
$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);
// 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"]));