Permalink
Browse files

Bugnote API: allow skipping of history event logging when adding notes

Affects #13167: Clone task: allow copying of notes
  • Loading branch information...
1 parent 89738d5 commit 6040ee601583ca557a5f0e3e0c6e0bcc04f40883 @rombert rombert committed Jul 21, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/bugnote_api.php
View
5 core/bugnote_api.php
@@ -123,7 +123,7 @@ function bugnote_is_user_reporter( $p_bugnote_id, $p_user_id ) {
* @return false|int false or indicating bugnote id added
* @access public
*/
-function bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null, $p_send_email = TRUE ) {
+function bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_private = false, $p_type = 0, $p_attr = '', $p_user_id = null, $p_send_email = TRUE, $p_log_history = TRUE) {
$c_bug_id = db_prepare_int( $p_bug_id );
$c_time_tracking = helper_duration_to_minutes( $p_time_tracking );
$c_private = db_prepare_bool( $p_private );
@@ -186,7 +186,8 @@ function bugnote_add( $p_bug_id, $p_bugnote_text, $p_time_tracking = '0:00', $p_
bug_update_date( $p_bug_id );
# log new bug
- history_log_event_special( $p_bug_id, BUGNOTE_ADDED, bugnote_format_id( $t_bugnote_id ) );
+ if ( TRUE == $p_log_history)
+ history_log_event_special( $p_bug_id, BUGNOTE_ADDED, bugnote_format_id( $t_bugnote_id ) );
# if it was FEEDBACK its NEW_ now
if ( config_get( 'reassign_on_feedback' ) &&

0 comments on commit 6040ee6

Please sign in to comment.