Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #15453: Only display Close button if workflow allows Closed status
  • Loading branch information
dregad committed Feb 6, 2013
1 parent 1f65ba4 commit 562db4f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/html_api.php
Expand Up @@ -1634,12 +1634,15 @@ function html_button_bug_reopen( $p_bug ) {

/**
* Print a button to close the given bug
* Only if user can close bugs and workflow allows moving them to that status
* @param BugData $p_bug Bug object
* @return null
*/
function html_button_bug_close( $p_bug ) {
if( access_can_close_bug( $p_bug ) ) {
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
if( access_can_close_bug( $p_bug )
&& bug_check_workflow( $p_bug->status, $t_closed_status )
) {
html_button(
'bug_change_status_page.php',
lang_get( 'close_bug_button' ),
Expand Down

0 comments on commit 562db4f

Please sign in to comment.