Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cbc40374e1b6
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4090050b8cef
Choose a head ref
  • 4 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 13, 2013

  1. Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    7159a92 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    dab98da View commit details

Commits on Apr 19, 2013

  1. Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    d75c2fb View commit details
  2. Add plugin event for e-mail subject customization

    New event: EVENT_DISPLAY_EMAIL_BUILD_SUBJECT
    
    Fixes #15648
    dregad committed Apr 19, 2013

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    4090050 View commit details
Showing with 11 additions and 4 deletions.
  1. +10 −4 core/email_api.php
  2. +1 −0 core/events_inc.php
14 changes: 10 additions & 4 deletions core/email_api.php
Original file line number Diff line number Diff line change
@@ -1070,10 +1070,16 @@ function email_build_subject( $p_bug_id ) {
# grab the subject (summary)
$p_subject = bug_get_field( $p_bug_id, 'summary' );

# padd the bug id with zeros
$p_bug_id = bug_format_id( $p_bug_id );
# pad the bug id with zeros
$t_bug_id = bug_format_id( $p_bug_id );

return '[' . $p_project_name . ' ' . $p_bug_id . ']: ' . $p_subject;
# build standard subject string
$t_email_subject = "[$p_project_name $t_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;
}

/**
@@ -1186,7 +1192,7 @@ function email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_proj
}

# build subject
$t_subject = '[' . $p_visible_bug_data['email_project'] . ' ' . bug_format_id( $p_visible_bug_data['email_bug'] ) . ']: ' . $p_visible_bug_data['email_summary'];
$t_subject = email_build_subject($p_visible_bug_data['email_bug']);

# build message

1 change: 1 addition & 0 deletions core/events_inc.php
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@
'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,