From 0eff23778d515e7b9b7ede523e865aa279474079 Mon Sep 17 00:00:00 2001 From: Heiko Schneider-Lange Date: Wed, 13 Mar 2013 12:19:09 +0100 Subject: [PATCH] add hook EVENT_DISPLAY_EMAIL_BUILD_SUBJECT for email subject --- core/email_api.php | 7 ++++++- core/events_inc.php | 1 + 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/core/email_api.php b/core/email_api.php index 0c3ac15..154f947 100644 --- a/core/email_api.php +++ b/core/email_api.php @@ -1087,7 +1087,12 @@ function email_build_subject( $p_bug_id ) { # padd the bug id with zeros $p_bug_id = bug_format_id( $p_bug_id ); - return '[' . $p_project_name . ' ' . $p_bug_id . ']: ' . $p_subject; + $t_email_subject = '[' . $p_project_name . ' ' . $p_bug_id . ']: ' . $p_subject; + + #update subject as defined by plugins + $t_email_subject = event_signal('EVENT_DISPLAY_EMAIL_BUILD_SUBJECT', $t_email_subject, array('bug_id' => $p_bug_id)); + + return $t_email_subject; } /** diff --git a/core/events_inc.php b/core/events_inc.php index 5079aa4..1c24d9a 100644 --- a/core/events_inc.php +++ b/core/events_inc.php @@ -41,6 +41,7 @@ event_declare_many( array( 'EVENT_DISPLAY_FORMATTED' => EVENT_TYPE_CHAIN, 'EVENT_DISPLAY_RSS' => EVENT_TYPE_CHAIN, 'EVENT_DISPLAY_EMAIL' => EVENT_TYPE_CHAIN, + 'EVENT_DISPLAY_EMAIL_BUILD_SUBJECT' => EVENT_TYPE_CHAIN, # Menu Events 'EVENT_MENU_MAIN' => EVENT_TYPE_DEFAULT, -- 1.7.2.5