$r = q('SELECT * FROM `item` WHERE `id` = %d', intval($current_post));
if ((dbm::is_result($r)) && (count($r) == 1)) {
- if ($notify)
+ if ($notify) {
call_hooks('post_local_end', $r[0]);
- else
+ } else {
call_hooks('post_remote_end', $r[0]);
- } else
+ }
+ } else {
logger('item_store: new item not found in DB, id ' . $current_post);
+ }
}
if ($arr['parent-uri'] === $arr['uri']) {
check_item_notification($current_post, $uid);
- if ($notify)
+ if ($notify) {
proc_run(PRIORITY_HIGH, "include/notifier.php", $notify_type, $current_post);
+ }
return $current_post;
}
$c = q("select name, url, thumb from contact where self = 1 and uid = %d limit 1",
intval($u[0]['uid'])
);
- if (! count($c)) {
+ if (! dbm::is_result($c)) {
return;
}
function tgroup_check($uid,$item) {
- $a = get_app();
-
$mention = false;
// check that the message originated elsewhere and is a top-level post