diff --git a/core/events_inc.php b/core/events_inc.php index 35861bb..016cdcd 100644 --- a/core/events_inc.php +++ b/core/events_inc.php @@ -108,6 +108,8 @@ event_declare_many( array( 'EVENT_BUGNOTE_EDIT_FORM' => EVENT_TYPE_EXECUTE, 'EVENT_BUGNOTE_EDIT' => EVENT_TYPE_EXECUTE, 'EVENT_BUGNOTE_DELETED' => EVENT_TYPE_EXECUTE, + 'EVENT_TAG_ATTACHED' => EVENT_TYPE_EXECUTE, + 'EVENT_TAG_DETACHED' => EVENT_TYPE_EXECUTE, # Email notification events 'EVENT_NOTIFY_USER_INCLUDE' => EVENT_TYPE_DEFAULT, diff --git a/docbook/developers/en/event-reference-bug.sgml b/docbook/developers/en/event-reference-bug.sgml index 70e89d8..eb0c69b 100644 --- a/docbook/developers/en/event-reference-bug.sgml +++ b/docbook/developers/en/event-reference-bug.sgml @@ -408,6 +408,38 @@ +
+ EVENT_TAG_ATTACHED (Execute) + +
+ + This event allows plugins to do post-processing of attached tags. + + + + Parameters + <Integer>: Bug ID + <Array of Integers>: Tag IDs + +
+
+ +
+ EVENT_TAG_DETACHED (Execute) + +
+ + This event allows plugins to do post-processing of detached tags. + + + + Parameters + <Integer>: Bug ID + <Integer>: Tag ID + +
+
+ diff --git a/tag_attach.php b/tag_attach.php index 99a80da..b725e17 100644 --- a/tag_attach.php +++ b/tag_attach.php @@ -127,6 +127,8 @@ } } + event_signal( 'EVENT_TAG_ATTACHED', array( $f_bug_id, $t_tags_attach ) ); + form_security_purge( 'tag_attach' ); print_successful_redirect_to_bug( $f_bug_id ); diff --git a/tag_detach.php b/tag_detach.php index 5c739b8..0262561 100644 --- a/tag_detach.php +++ b/tag_detach.php @@ -36,6 +36,8 @@ tag_bug_detach( $f_tag_id, $f_bug_id ); + event_signal( 'EVENT_TAG_DETACHED', array( $f_bug_id, $f_tag_id ) ); + form_security_purge( 'tag_detach' ); print_successful_redirect_to_bug( $f_bug_id );