Skip to content

Commit 562db4f

Browse files
committedFeb 6, 2013
Fix #15453: Only display Close button if workflow allows Closed status
1 parent 1f65ba4 commit 562db4f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎core/html_api.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -1634,12 +1634,15 @@ function html_button_bug_reopen( $p_bug ) {
16341634

16351635
/**
16361636
* Print a button to close the given bug
1637+
* Only if user can close bugs and workflow allows moving them to that status
16371638
* @param BugData $p_bug Bug object
16381639
* @return null
16391640
*/
16401641
function html_button_bug_close( $p_bug ) {
1641-
if( access_can_close_bug( $p_bug ) ) {
1642-
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
1642+
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
1643+
if( access_can_close_bug( $p_bug )
1644+
&& bug_check_workflow( $p_bug->status, $t_closed_status )
1645+
) {
16431646
html_button(
16441647
'bug_change_status_page.php',
16451648
lang_get( 'close_bug_button' ),

0 commit comments

Comments
 (0)
Please sign in to comment.