TRUE and not group by object_guid
// river table does not have columns expected by get_access_sql_suffix so we modify its output
$access = str_replace("and enabled='yes'", '', str_replace('owner_guid', 'subject_guid', get_access_sql_suffix_new('r', 'e')));
$q = "SELECT COUNT(id) as all_activity FROM {$CONFIG->dbprefix}river r, {$CONFIG->dbprefix}entities e
WHERE r.posted > $last_reload AND r.object_guid = e.guid AND ($access)";
if ($d = get_data($q)) {
$all_activity = $d[0]->all_activity;
} else {
$all_activity = 0;
}
if ($all_activity > 0) {
$s = ($all_activity == 1) ? '' : 's';
echo "$all_activity update$s!";
?>