Index: bugnote_add_inc.php =================================================================== --- bugnote_add_inc.php (revision 211) +++ bugnote_add_inc.php (working copy) @@ -30,6 +30,7 @@ +
@@ -70,6 +71,15 @@ + + + Parent-Bugnote-ID: + + + + + + > @@ -97,11 +107,7 @@ - - - - - +
0){ + html_page_top(); + + echo "
\n
\n"; + print_hr(); + echo "\n" . lang_get('delete_bugnote_delete_child_bugnotes_first') . "\n"; + print_hr(); + echo "
\n"; + + html_page_bottom(); + exit; + }else{ helper_ensure_confirmed( lang_get( 'delete_bugnote_sure_msg' ), lang_get( 'delete_bugnote_button' ) ); @@ -63,3 +82,4 @@ form_security_purge( 'bugnote_delete' ); print_successful_redirect( string_get_bug_view_url( $t_bug_id ) . '#bugnotes' ); + } Index: bugnote_view_inc.php =================================================================== --- bugnote_view_inc.php (revision 211) +++ bugnote_view_inc.php (working copy) @@ -27,8 +27,14 @@ /** * Requires bugnote API */ + require_once( 'current_user_api.php' ); +showBugnotes($f_bug_id); + +function showBugnotes($f_bug_id, $t_parent_bugnote_id = 0){ + global $g_project_override, $tpl_bug_id, $t_bugnote; + # grab the user id currently logged in $t_user_id = auth_get_current_user_id(); @@ -41,7 +47,14 @@ # get the bugnote data $t_bugnote_order = current_user_get_pref( 'bugnote_order' ); -$t_bugnotes = bugnote_get_all_visible_bugnotes( $f_bug_id, $t_bugnote_order, 0, $t_user_id ); + if($t_parent_bugnote_id > 0){ + $t_bugnotes = bugnote_get_all_visible_bugnotes( $f_bug_id, $t_bugnote_order, 0, $t_user_id, $t_parent_bugnote_id); + if(count($t_bugnotes) < 1){ + return 0; + } + }else{ + $t_bugnotes = bugnote_get_all_visible_bugnotes( $f_bug_id, $t_bugnote_order, 0, $t_user_id, 0); + } #precache users $t_bugnote_users = array(); @@ -51,6 +64,8 @@ user_cache_array_rows( $t_bugnote_users ); $num_notes = count( $t_bugnotes ); + + if($t_parent_bugnote_id < 1){ ?> @@ -68,6 +83,11 @@ + + @@ -108,11 +128,12 @@ $t_bugnote_css = 'bugnote-public'; $t_bugnote_note_css = 'bugnote-note-public'; } + ?> id, VS_PRIVATE == $t_bugnote->view_state ) ); ?> + id); + if(count($t_childBugnotes) > 0){ + ?> + + + + 0 && access_has_bug_level( config_get( 'time_tracking_view_threshold' ), $f_bug_id ) ) { + if ($t_parent_bugnote_id < 1 && $t_total_time > 0 && access_has_bug_level( config_get( 'time_tracking_view_threshold' ), $f_bug_id ) ) { echo ''; } + if($t_parent_bugnote_id < 1){ event_signal( 'EVENT_VIEW_BUGNOTES_END', $f_bug_id ); + } ?>
reporter_id ); ?> - ()
+ () reporter_id ); ?> @@ -129,13 +150,12 @@ [ ]
- date_submitted ); ?>
- date_submitted ); ?>' . lang_get( 'edited_on') . lang_get( 'word_separator' ) . date( $t_normal_date_format, $t_bugnote->last_modified ) . '
'; + echo ', ' . lang_get( 'edited_on') . lang_get( 'word_separator' ) . date( $t_normal_date_format, $t_bugnote->last_modified ) . ''; } ?> -
+
id, lang_get( 'make_private' ) ); } } + + ?> + [Antworten] +
@@ -211,29 +235,58 @@ break; } - echo string_display_links( $t_bugnote->note );; + $note = str_replace(array('<','>'), array('<','>'), $t_bugnote->note); + echo string_display_links( $note ); ?>
+ + + + + +
  + id); + ?> +
+
', sprintf ( lang_get( 'total_time_for_issue' ), db_minutes_to_hhmm( $t_total_time ) ), '
-
@@ -244,3 +297,7 @@
-1){ + $t_query .= " AND b.parent_bugnote_id=" . db_param(); + } + + $t_query .= " ORDER BY b.id ASC"; $t_bugnotes = array(); # BUILD bugnotes array - $t_result = db_query_bound( $t_query, array( $p_bug_id ) ); + $t_result = db_query_bound( $t_query, array( $p_bug_id , $p_parent_bugnote_id ) ); while( $row = db_fetch_array( $t_result ) ) { $t_bugnote = new BugnoteData; @@ -454,10 +463,10 @@ $g_cache_bugnote[(int)$t_bugnote->id] = $t_bugnote; } - $g_cache_bugnotes[(int)$p_bug_id] = $t_bugnotes; + $g_cache_bugnotes[(int)$p_bug_id . (int)$p_parent_bugnote_id] = $t_bugnotes; } - return $g_cache_bugnotes[(int)$p_bug_id]; + return $g_cache_bugnotes[(int)$p_bug_id . (int)$p_parent_bugnote_id]; } /** Index: lang/strings_english.txt =================================================================== --- lang/strings_english.txt (revision 211) +++ lang/strings_english.txt (working copy) @@ -96,6 +96,7 @@ $s_bugnote_link_title = 'Direct link to note'; $s_delete_bugnote_button = 'Delete Note'; $s_delete_bugnote_sure_msg = 'Are you sure you wish to delete this note?'; +$s_delete_bugnote_delete_child_bugnotes_first = 'Please delete the Child-Notes first!'; $s_bug_relationships = 'Relationships'; $s_empty_password_sure_msg = 'The user has an empty password. Are you sure that is what you want?'; $s_empty_password_button = 'Use Empty Password';