cvs diff -u (in directory C:\Inetpub\wwwroot\mantisbt\) cvs diff: Diffing . Index: bug_relationship_add.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_relationship_add.php,v retrieving revision 1.2 diff -u -r1.2 bug_relationship_add.php --- bug_relationship_add.php 18 Jul 2004 00:07:44 -0000 1.2 +++ bug_relationship_add.php 5 Sep 2004 15:54:24 -0000 @@ -68,6 +68,10 @@ history_log_event_special( $f_src_bug_id, BUG_ADD_RELATIONSHIP, BUG_BLOCKS, $f_dest_bug_id ); history_log_event_special( $f_dest_bug_id, BUG_ADD_RELATIONSHIP, BUG_DEPENDANT, $f_src_bug_id ); + # send email notification to the users addressed by both the bugs + email_relationship_added( $f_src_bug_id, $f_dest_bug_id, BUG_BLOCKS ); + email_relationship_added( $f_dest_bug_id, $f_src_bug_id, BUG_DEPENDANT ); + break; case BUG_DEPENDANT: @@ -78,6 +82,10 @@ history_log_event_special( $f_src_bug_id, BUG_ADD_RELATIONSHIP, BUG_DEPENDANT, $f_dest_bug_id ); history_log_event_special( $f_dest_bug_id, BUG_ADD_RELATIONSHIP, BUG_BLOCKS, $f_src_bug_id ); + # send email notification to the users addressed by both the bugs + email_relationship_added( $f_src_bug_id, $f_dest_bug_id, BUG_DEPENDANT ); + email_relationship_added( $f_dest_bug_id, $f_src_bug_id, BUG_BLOCKS ); + break; case BUG_HAS_DUPLICATE: @@ -90,6 +98,10 @@ history_log_event_special( $f_src_bug_id, BUG_ADD_RELATIONSHIP, BUG_HAS_DUPLICATE, $f_dest_bug_id ); history_log_event_special( $f_dest_bug_id, BUG_ADD_RELATIONSHIP, BUG_DUPLICATE, $f_src_bug_id ); + # send email notification to the users addressed by both the bugs + email_relationship_added( $f_src_bug_id, $f_dest_bug_id, BUG_HAS_DUPLICATE ); + email_relationship_added( $f_dest_bug_id, $f_src_bug_id, BUG_DUPLICATE ); + break; case BUG_DUPLICATE: @@ -100,6 +112,10 @@ history_log_event_special( $f_src_bug_id, BUG_ADD_RELATIONSHIP, BUG_DUPLICATE, $f_dest_bug_id ); history_log_event_special( $f_dest_bug_id, BUG_ADD_RELATIONSHIP, BUG_HAS_DUPLICATE, $f_src_bug_id ); + # send email notification to the users addressed by both the bugs + email_relationship_added( $f_src_bug_id, $f_dest_bug_id, BUG_DUPLICATE ); + email_relationship_added( $f_dest_bug_id, $f_src_bug_id, BUG_HAS_DUPLICATE ); + break; case BUG_RELATED: @@ -109,6 +125,10 @@ history_log_event_special( $f_src_bug_id, BUG_ADD_RELATIONSHIP, BUG_RELATED, $f_dest_bug_id ); history_log_event_special( $f_dest_bug_id, BUG_ADD_RELATIONSHIP, BUG_RELATED, $f_src_bug_id ); + # send email notification to the users addressed by both the bugs + email_relationship_added( $f_src_bug_id, $f_dest_bug_id, BUG_RELATED ); + email_relationship_added( $f_dest_bug_id, $f_src_bug_id, BUG_RELATED ); + break; default: @@ -120,10 +140,6 @@ # update bug last updated (just for the src bug) bug_update_date( $f_src_bug_id ); - # send email notification to the users addressed by both the bugs - email_relationship_added( $f_src_bug_id ); - email_relationship_added( $f_dest_bug_id ); - print_header_redirect_view( $f_src_bug_id ); # MASC RELATIONSHIP Index: bug_relationship_delete.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_relationship_delete.php,v retrieving revision 1.2 diff -u -r1.2 bug_relationship_delete.php --- bug_relationship_delete.php 1 Aug 2004 22:31:48 -0000 1.2 +++ bug_relationship_delete.php 5 Sep 2004 15:54:24 -0000 @@ -8,8 +8,7 @@ # -------------------------------------------------------- # $Id: bug_relationship_delete.php,v 1.2 2004/08/01 22:31:48 prichards Exp $ # -------------------------------------------------------- -?> -type; + # delete relationship from the DB relationship_delete( $f_rel_id ); # update bug last updated (just for the src bug) bug_update_date( $f_bug_id ); - # Add log line to the history of both bugs - # Send email notification to the users addressed by both the bugs - history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, '', $t_dest_bug_id ); - email_relationship_deleted( $f_bug_id ); + # Add log lines to both the histories + switch ( $t_rel_type ) { + case BUG_BLOCKS: + history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, BUG_BLOCKS, $t_dest_bug_id ); + email_relationship_deleted( $f_bug_id, $t_dest_bug_id, BUG_BLOCKS ); - # Add log line to the history of both bugs - # Send email notification to the users addressed by both the bugs if ( bug_exists( $t_dest_bug_id )) { - history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, '', $f_bug_id ); - email_relationship_deleted( $t_dest_bug_id ); + history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, BUG_DEPENDANT, $f_bug_id ); + email_relationship_deleted( $t_dest_bug_id, $f_bug_id, BUG_DEPENDANT ); + } + break; + + case BUG_DEPENDANT: + history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, BUG_DEPENDANT, $t_dest_bug_id ); + email_relationship_deleted( $f_bug_id, $t_dest_bug_id, BUG_DEPENDANT ); + + if ( bug_exists( $t_dest_bug_id )) { + history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, BUG_BLOCKS, $f_bug_id ); + email_relationship_deleted( $t_dest_bug_id, $f_bug_id, BUG_BLOCKS ); + } + break; + + case BUG_HAS_DUPLICATE: + history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, BUG_HAS_DUPLICATE, $t_dest_bug_id ); + email_relationship_deleted( $f_bug_id, $t_dest_bug_id, BUG_HAS_DUPLICATE ); + + if ( bug_exists( $t_dest_bug_id )) { + history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, BUG_DUPLICATE, $f_bug_id ); + email_relationship_deleted( $t_dest_bug_id, $f_bug_id, BUG_DUPLICATE ); + } + break; + + case BUG_DUPLICATE: + history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, BUG_DUPLICATE, $t_dest_bug_id ); + email_relationship_deleted( $f_bug_id, $t_dest_bug_id, BUG_DUPLICATE ); + + if ( bug_exists( $t_dest_bug_id )) { + history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, BUG_HAS_DUPLICATE, $f_bug_id ); + email_relationship_deleted( $t_dest_bug_id, $f_bug_id, BUG_HAS_DUPLICATE ); + } + break; + + case BUG_RELATED: + history_log_event_special( $f_bug_id, BUG_DEL_RELATIONSHIP, BUG_RELATED, $t_dest_bug_id ); + email_relationship_deleted( $f_bug_id, $t_dest_bug_id, BUG_RELATED ); + + if ( bug_exists( $t_dest_bug_id )) { + history_log_event_special( $t_dest_bug_id, BUG_DEL_RELATIONSHIP, BUG_RELATED, $f_bug_id ); + email_relationship_deleted( $t_dest_bug_id, $f_bug_id, BUG_RELATED ); + } + break; + + default: + trigger_error( ERROR_GENERIC, ERROR ); + break; } print_header_redirect_view( $f_bug_id ); Index: bug_report.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/bug_report.php,v retrieving revision 1.38 diff -u -r1.38 bug_report.php --- bug_report.php 21 Aug 2004 13:27:25 -0000 1.38 +++ bug_report.php 5 Sep 2004 15:54:26 -0000 @@ -136,7 +136,7 @@ history_log_event_special( $t_bug_id, BUG_ADD_RELATIONSHIP, BUG_BLOCKS, $f_master_bug_id ); # send email notification to the users addressed by the master bug - email_relationship_added( $f_master_bug_id ); + email_relationship_added( $f_master_bug_id, $t_bug_id ); } email_new_bug( $t_bug_id ); cvs diff: Diffing admin cvs diff: Diffing admin/css cvs diff: Diffing admin/upgrades cvs diff: Diffing core Index: core/email_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v retrieving revision 1.99 diff -u -r1.99 email_api.php --- core/email_api.php 31 Aug 2004 03:54:47 -0000 1.99 +++ core/email_api.php 5 Sep 2004 15:54:32 -0000 @@ -389,7 +389,7 @@ # $p_notify_type: use check who she get notified of such event. # $p_message_id: message id to be translated and included at the top of the email message. # Return false if it were problems sending email - function email_generic( $p_bug_id, $p_notify_type, $p_message_id = null ) { + function email_generic( $p_bug_id, $p_notify_type, $p_message_id = null, $p_header_optional_params = null ) { $t_ok = true; if ( ON === config_get( 'enable_email_notification' ) ) { ignore_user_abort( true ); @@ -405,7 +405,7 @@ # send email to every recipient foreach ( $t_recipients as $t_user_id => $t_user_email ) { $t_visible_bug_data = email_build_visible_bug_data( $t_user_id, $p_bug_id, $p_message_id ); - $t_ok = email_bug_info_to_one_user( $t_visible_bug_data, $p_message_id, $t_project_id, $t_user_id ) && $t_ok; + $t_ok = email_bug_info_to_one_user( $t_visible_bug_data, $p_message_id, $t_project_id, $t_user_id, $p_header_optional_params ) && $t_ok; } } } @@ -416,15 +416,21 @@ # -------------------- # send notices when a relationship is ADDED # MASC RELATIONSHIP - function email_relationship_added( $p_bug_id ) { - email_generic( $p_bug_id, 'relation', 'email_notification_title_for_action_relationship_added' ); + function email_relationship_added( $p_bug_id, $p_related_bug_id, $p_rel_type ) { + $t_opt = array(); + $t_opt[] = relationship_get_description_for_history( $p_rel_type ); + $t_opt[] = bug_format_id( $p_related_bug_id ); + email_generic( $p_bug_id, 'relation', 'email_notification_title_for_action_relationship_added', $t_opt ); } # -------------------- # send notices when a relationship is DELETED # MASC RELATIONSHIP - function email_relationship_deleted( $p_bug_id ) { - email_generic( $p_bug_id, 'relation', 'email_notification_title_for_action_relationship_deleted' ); + function email_relationship_deleted( $p_bug_id, $p_related_bug_id, $p_rel_type ) { + $t_opt = array(); + $t_opt[] = relationship_get_description_for_history( $p_rel_type ); + $t_opt[] = bug_format_id( $p_related_bug_id ); + email_generic( $p_bug_id, 'relation', 'email_notification_title_for_action_relationship_deleted', $t_opt ); } # -------------------- @@ -460,7 +466,9 @@ $t_status = bug_get_field( $t_src_bug_id, 'status' ); if ( $t_status < config_get( 'bug_resolved_status_threshold' ) ) { # sent the notification just for parent bugs not resolved/closed - email_generic( $t_src_bug_id, 'handler', $p_message_id ); + $t_opt = array(); + $t_opt[] = bug_format_id( $t_src_bug_id ); + email_generic( $t_src_bug_id, 'handler', $p_message_id, $t_opt ); } } } @@ -778,6 +786,9 @@ # build message $t_message = lang_get_defaulted( $p_message_id, null ); + if ( is_array( $p_header_optional_params ) ) { + $t_message = vsprintf( $t_message, $p_header_optional_params ); + } if ( ( $t_message !== null ) && ( !is_blank( $t_message ) ) ) { $t_message .= "\n"; } cvs diff: Diffing core/adodb cvs diff: Diffing core/adodb/cute_icons_for_site cvs diff: Diffing core/adodb/datadict cvs diff: Diffing core/adodb/drivers cvs diff: Diffing core/adodb/lang cvs diff: Diffing core/adodb/tests cvs diff: Diffing core/phpmailer cvs diff: Diffing core/phpmailer/language cvs diff: Diffing css cvs diff: Diffing doc cvs diff: Diffing graphs cvs diff: Diffing images cvs diff: Diffing javascript cvs diff: Diffing lang Index: lang/strings_english.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v retrieving revision 1.205 diff -u -r1.205 strings_english.txt --- lang/strings_english.txt 1 Sep 2004 18:12:39 -0000 1.205 +++ lang/strings_english.txt 5 Sep 2004 15:54:39 -0000 @@ -292,10 +292,10 @@ $s_email_notification_title_for_action_sponsorship_deleted = 'A sponsorship of the following issue was withdrawn.'; $s_email_notification_title_for_action_bugnote_submitted = 'A NOTE has been added to this issue.'; -$s_email_notification_title_for_action_relationship_added = "A new RELATIONSHIP has been added to the following issue."; -$s_email_notification_title_for_action_relationship_deleted = "A RELATIONSHIP has been deleted from the following issue."; -$s_email_notification_title_for_action_relationship_child_resolved = "A RELATED issue has been RESOLVED."; -$s_email_notification_title_for_action_relationship_child_closed = "A RELATED issue has been CLOSED."; +$s_email_notification_title_for_action_relationship_added = "The RELATIONSHIP '%s issue %s' has been added to the following issue."; +$s_email_notification_title_for_action_relationship_deleted = "The RELATIONSHIP '%s issue %s' has been deleted from the following issue."; +$s_email_notification_title_for_action_relationship_child_resolved = "The RELATED issue %s has been RESOLVED."; +$s_email_notification_title_for_action_relationship_child_closed = "The RELATED issue %s has been CLOSED."; $s_email_reporter = 'Reported By'; $s_email_handler = 'Assigned To'; Index: lang/strings_italian.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_italian.txt,v retrieving revision 1.78 diff -u -r1.78 strings_italian.txt --- lang/strings_italian.txt 26 Aug 2004 17:40:57 -0000 1.78 +++ lang/strings_italian.txt 5 Sep 2004 15:54:47 -0000 @@ -292,10 +292,10 @@ $s_email_notification_title_for_action_sponsorship_deleted = "Una sponsorizzazione della seguente anomalia é stata eliminata."; $s_email_notification_title_for_action_bugnote_submitted = "Una NOTA é stata aggiunta a questa anomalia."; -$s_email_notification_title_for_action_relationship_added = "E' stata aggiunta una RELAZIONE alla seguente anomalia."; -$s_email_notification_title_for_action_relationship_deleted = "E' stata eliminata una RELAZIONE dalla seguente anomalia."; -$s_email_notification_title_for_action_relationship_child_resolved = "E' stata RISOLTA una anomalia in RELAZIONE con l'anomalia seguente."; -$s_email_notification_title_for_action_relationship_child_closed = "E' stata CHIUSA una anomalia in RELAZIONE con l'anomalia seguente."; +$s_email_notification_title_for_action_relationship_added = "E' stata aggiunta la RELAZIONE '%s anomalia %s' alla seguente anomalia."; +$s_email_notification_title_for_action_relationship_deleted = "E' stata eliminata la RELAZIONE '%s anomalia %s' dalla seguente anomalia."; +$s_email_notification_title_for_action_relationship_child_resolved = "E' stata RISOLTA l'anomalia %s in RELAZIONE con la seguente anomalia."; +$s_email_notification_title_for_action_relationship_child_closed = "E' stata CHIUSA l'anomalia %s in RELAZIONE con la seguente anomalia."; $s_email_reporter = "Segnalato da"; $s_email_handler = "In carico a"; cvs diff: Diffing packages cvs diff: Diffing sql