Index: og_notifications.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/og/og_notifications/Attic/og_notifications.module,v retrieving revision 1.1.2.2.2.11 diff -u -r1.1.2.2.2.11 og_notifications.module --- og_notifications.module 30 Oct 2008 19:14:46 -0000 1.1.2.2.2.11 +++ og_notifications.module 3 Nov 2008 17:21:59 -0000 @@ -253,15 +253,19 @@ 'fields' => array('group', 'type') ); return $types; + case 'subscription fields': + // Information about available fields for subscriptions + $fields['group'] = array( + 'name' => t('Group'), + 'field' => 'group', + 'type' => 'int', + ); + return $fields; case 'query': if ($arg0 == 'event' && $arg1 == 'node' && ($node = $arg2->node) || $arg0 == 'user' && $arg1 == 'node' && ($node = $arg2)) { $query = array(); if ($node->og_groups) { - $query[] = array( - 'join' => "LEFT JOIN {og_ancestry} oga ON f.field = 'group' AND f.value = CAST(oga.group_nid AS CHAR(255))", - 'where' => 'oga.nid = %d', - 'args' => array($node->nid) - ); + $query[]['fields']['group'] = $node->og_groups; } if ($arg0 == 'user' && og_is_group_type($node->type)) { $query[]['fields']['group'] = $node->nid;