From 2f21341f4ef015bf0c1b3ac838873ab2bebc36db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 28 Dec 2007 15:21:30 +0000 Subject: #203941 reported and tested by Takafumi, patch by myself: trigger assocations should be removed when deleting an advanced action --- modules/trigger/trigger.module | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/trigger') diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module index 17ecfb129..283f9a148 100644 --- a/modules/trigger/trigger.module +++ b/modules/trigger/trigger.module @@ -418,3 +418,12 @@ function trigger_options($type = 'all') { return $options[$type]; } } + +/** + * Implementation of hook_actions_delete(). + * + * Remove all trigger entries for the given action, when deleted. + */ +function trigger_actions_delete($aid) { + db_query("DELETE FROM {trigger_assignments} WHERE aid = '%s'", $aid); +} -- cgit v1.2.3