function og_handler_field_count in Organic groups 5.7
Same name and namespace in other branches
- 5.8 og_views.inc \og_handler_field_count()
- 5 og_views.inc \og_handler_field_count()
- 5.2 og_views.inc \og_handler_field_count()
- 5.3 og_views.inc \og_handler_field_count()
Views handler to display the number subscriptions
1 string reference to 'og_handler_field_count'
- og_views_tables in ./
og_views.inc - Implementation of the hook_views_tables()
File
- ./
og_views.inc, line 1257
Code
function og_handler_field_count($fieldinfo, $fielddata, $value, $data) {
global $user;
$cnt = db_num_rows(db_query(og_list_users_sql(), $data->nid));
return in_array($data->nid, array_keys($user->og_groups)) ? l($cnt, "og/users/{$data->nid}") : $cnt;
}