require_once 'custom_field_api.php'; require_once 'date_api.php'; require_once 'last_visited_api.php'; require_once 'projax_api.php'; $f_bug_id = gpc_get_int('bug_id'); $tpl_bug = bug_get($f_bug_id, true); if ($tpl_bug->project_id != helper_get_current_project()) { # in case the current project is not the same project of the bug we are viewing... # ... override the current project. This to avoid problems with categories and handlers lists etc. $g_project_override = $tpl_bug->project_id; $tpl_changed_project = true; } else { $tpl_changed_project = false; } // MOD: WK/BFE: bug_is_readonly geaendert auf bug_is_readonly_BFE if (bug_is_readonly_BFE($f_bug_id)) { error_parameters($f_bug_id); trigger_error(ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR); } access_ensure_bug_level(config_get('update_bug_threshold'), $f_bug_id); html_page_top(bug_format_summary($f_bug_id, SUMMARY_CAPTION)); print_recently_visited(); $t_fields = config_get('bug_update_page_fields'); $t_fields = columns_filter_disabled($t_fields); $tpl_bug_id = $f_bug_id; $t_action_button_position = config_get('action_button_position'); $tpl_top_buttons_enabled = $t_action_button_position == POSITION_TOP || $t_action_button_position == POSITION_BOTH; $tpl_bottom_buttons_enabled = $t_action_button_position == POSITION_BOTTOM || $t_action_button_position == POSITION_BOTH; $tpl_show_id = in_array('id', $t_fields); $tpl_show_project = in_array('project', $t_fields); $tpl_show_category = in_array('category_id', $t_fields);
/** * Print all buttons for view bug pages * @param int $p_bug_id * @return null */ function html_buttons_view_bug_page($p_bug_id) { $t_resolved = config_get('bug_resolved_status_threshold'); $t_closed = config_get('bug_closed_status_threshold'); $t_status = bug_get_field($p_bug_id, 'status'); $t_readonly = bug_is_readonly($p_bug_id); // WK/BFE: Folgende Zeile ist eine Kopie der vorigen., LB/BFE 2015 // bug_is_readonly -> bug_is_readonly_BFE // $t_readonly -> $t_readonly_BFE $t_readonly_BFE = bug_is_readonly_BFE($p_bug_id); $t_sticky = config_get('set_bug_sticky_threshold'); $t_bug = bug_get($p_bug_id); echo '<table><tr class="vcenter">'; // WK/BFE: Bedingund von $t_readonly auf $t_readonly_BFE geändert., LB/BFE 2015 if (!$t_readonly_BFE) { # UPDATE button echo '<td class="center">'; html_button_bug_update($p_bug_id); echo '</td>'; } if (!$t_readonly) { # ASSIGN button echo '<td class="center">'; html_button_bug_assign_to($t_bug); echo '</td>'; } # Change status button/dropdown if (!$t_readonly) { echo '<td class="center">'; html_button_bug_change_status($t_bug); echo '</td>'; } # MONITOR/UNMONITOR button if (!current_user_is_anonymous()) { echo '<td class="center">'; if (user_is_monitoring_bug(auth_get_current_user_id(), $p_bug_id)) { html_button_bug_unmonitor($p_bug_id); } else { html_button_bug_monitor($p_bug_id); } echo '</td>'; } # STICK/UNSTICK button if (access_has_bug_level($t_sticky, $p_bug_id)) { echo '<td class="center">'; if (!bug_get_field($p_bug_id, 'sticky')) { html_button_bug_stick($p_bug_id); } else { html_button_bug_unstick($p_bug_id); } echo '</td>'; } # CLONE button if (!$t_readonly) { echo '<td class="center">'; html_button_bug_create_child($p_bug_id); echo '</td>'; } # REOPEN button echo '<td class="center">'; html_button_bug_reopen($t_bug); echo '</td>'; # CLOSE button # LB/BFE 2015 Schließen-Button entfernt: https://issuetracking.bfe.tv/view.php?id=18093 /* echo '<td class="center">'; html_button_bug_close( $t_bug ); echo '</td>'; */ # MOVE button echo '<td class="center">'; html_button_bug_move($p_bug_id); echo '</td>'; # DELETE button echo '<td class="center">'; html_button_bug_delete($p_bug_id); echo '</td>'; helper_call_custom_function('print_bug_view_page_custom_buttons', array($p_bug_id)); echo '</tr></table>'; }