summaryrefslogtreecommitdiff
path: root/modules/trigger
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-28 15:21:30 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-28 15:21:30 +0000
commit2f21341f4ef015bf0c1b3ac838873ab2bebc36db (patch)
tree1a6be248f0f8334f569bba48a02a23b0327235a1 /modules/trigger
parenta88c178b91ff1342377b89b68965dcf7aaac725a (diff)
downloadbrdo-2f21341f4ef015bf0c1b3ac838873ab2bebc36db.tar.gz
brdo-2f21341f4ef015bf0c1b3ac838873ab2bebc36db.tar.bz2
#203941 reported and tested by Takafumi, patch by myself: trigger assocations should be removed when deleting an advanced action
Diffstat (limited to 'modules/trigger')
-rw-r--r--modules/trigger/trigger.module9
1 files changed, 9 insertions, 0 deletions
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);
+}