diff options
Diffstat (limited to 'mod')
| -rw-r--r-- | mod/riverdashboard/endpoint/ping.php | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php index 93625e1b7..5dd3bff5e 100644 --- a/mod/riverdashboard/endpoint/ping.php +++ b/mod/riverdashboard/endpoint/ping.php @@ -18,8 +18,13 @@ $last_reload = time() - $seconds_passed;  // This entire system is driven by the river table.  // There is no core interface to simply grab the number of entries in the table.  // In order for something to count as an update, you must put a call to add_river_item(). +// @todo Remove this when elgg_get_river_items() supports 1.7-style API and count => 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"; +	WHERE r.posted > $last_reload AND r.object_guid = e.guid AND ($access)";  if ($d = get_data($q)) {  	$all_activity = $d[0]->all_activity;  | 
