View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015648 | mantisbt | public | 2013-03-13 07:29 | 2025-01-23 06:44 | |
Reporter | HeikoSL | Assigned To | dregad | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.14 | ||||
Target Version | 1.2.16 | Fixed in Version | 1.2.16 | ||
Summary | 0015648: add event signalling to email_build_subject() function | ||||
Description | For customization I need to add event signalling to email_build_subject() function. That will let me use a plugin to customize email subjects. | ||||
Additional Information | depends on 0015647 to work properly on all email subjects | ||||
Tags | No tags attached. | ||||
Attached Files | hook_build_subject.patch (1,445 bytes)
From 0eff23778d515e7b9b7ede523e865aa279474079 Mon Sep 17 00:00:00 2001 From: Heiko Schneider-Lange <heikoschneider@web.de> 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 | ||||
for whom it may concern: |
|
Forked in mantibt-plugins organization - https://github.com/mantisbt-plugins/CustomizeEmailSubject |
|
MantisBT: master-1.2.x 4090050b 2013-04-19 07:56 Details Diff |
Add plugin event for e-mail subject customization New event: EVENT_DISPLAY_EMAIL_BUILD_SUBJECT Fixes 0015648 |
Affected Issues 0015648 |
|
mod - core/email_api.php | Diff File | ||
mod - core/events_inc.php | Diff File | ||
MantisBT: master b292ef1b 2013-04-19 07:56 Details Diff |
Add plugin event for e-mail subject customization New event: EVENT_DISPLAY_EMAIL_BUILD_SUBJECT Fixes 0015648 |
Affected Issues 0015648, 0035255 |
|
mod - core/email_api.php | Diff File | ||
mod - core/events_inc.php | Diff File |