Index: modules/trigger/trigger.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/trigger/trigger.admin.inc,v retrieving revision 1.9 diff -u -r1.9 modules/trigger/trigger.admin.inc --- modules/trigger/trigger.admin.inc 8 Mar 2009 04:25:07 -0000 1.9 +++ modules/trigger/trigger.admin.inc 27 Mar 2009 17:57:35 -0000 @@ -24,10 +24,15 @@ $output = ''; $hooks = module_invoke_all('hook_info'); foreach ($hooks as $module => $hook) { - if (isset($hook[$type])) { - foreach ($hook[$type] as $op => $description) { - $form_id = 'trigger_' . $type . '_' . $op . '_assign_form'; - $output .= drupal_get_form($form_id, $type, $op, $description['runs when']); + if ($module == $type) { + foreach ($hook as $hook_name => $hook_details) { + //Require hook name to start with module name, to avoid namespace collisions. + if ($module == substr($hook_name, 0, strlen($module))) { + foreach ($hook_details as $op => $description) { + $form_id = 'trigger_'. $hook_name .'_'. $op .'_assign_form'; + $output .= drupal_get_form($form_id, $hook_name, $op, $description['runs when']); + } + } } } }