function shoutbox_group_query_shouts_alter in Shoutbox 7.2
Same name and namespace in other branches
- 7 shoutbox_group/shoutbox_group.module \shoutbox_group_query_shouts_alter()
Implementation of hook_query_alter()
File
- shoutbox_group/
shoutbox_group.module, line 172
Code
function shoutbox_group_query_shouts_alter(QueryAlterableInterface $query) {
global $group;
if (!is_array($group)) {
return;
}
//$nid= isset($group->etid) ? $group->etid : $group->gid;
$nid = $group['gid'];
$query
->innerJoin('shoutbox_groups', 'sg', 's.shout_id = sg.shout_id');
//JOIN node with users
$query
->condition('nid', $nid, '=');
}