Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d85e69f

Browse files
committedFeb 6, 2013
Fix #15453: Only display Close button if workflow allows Closed status
1 parent 37631b8 commit d85e69f

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
@@ -1577,12 +1577,15 @@ function html_button_bug_reopen( $p_bug ) {
15771577

15781578
/**
15791579
* Print a button to close the given bug
1580+
* Only if user can close bugs and workflow allows moving them to that status
15801581
* @param BugData $p_bug Bug object
15811582
* @return null
15821583
*/
15831584
function html_button_bug_close( $p_bug ) {
1584-
if( access_can_close_bug( $p_bug ) ) {
1585-
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
1585+
$t_closed_status = config_get( 'bug_closed_status_threshold', null, null, $p_bug->project_id );
1586+
if( access_can_close_bug( $p_bug )
1587+
&& bug_check_workflow( $p_bug->status, $t_closed_status )
1588+
) {
15861589
html_button(
15871590
'bug_change_status_page.php',
15881591
lang_get( 'close_bug_button' ),

0 commit comments

Comments
 (0)
Please sign in to comment.