Skip to content

Commit

Permalink
Workflow thresholds page: hide delete button when not needed
Browse files Browse the repository at this point in the history
The button is now displayed only when there are overrides specific to
the current project.

Fixes #16412
  • Loading branch information
dregad committed Sep 26, 2013
1 parent 2ecfefa commit cf72f3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manage_config_work_threshold_page.php
Expand Up @@ -98,22 +98,22 @@ function get_section_begin_mcwt( $p_section_name ) {
* @return string HTML tag attribute for background color override
*/
function set_color( $p_threshold, $p_file, $p_global, $p_project, $p_set_override ) {
global $t_color_project, $t_color_global;
global $t_color_project, $t_color_global, $t_project_id;

$t_color = false;

# all projects override
if ( $p_global != $p_file ) {
$t_color = $t_color_global;
if ( $p_set_override ) {
if ( $p_set_override && ALL_PROJECTS == $t_project_id ) {
set_overrides( $p_threshold );
}
}

# project overrides
if ( $p_project != $p_global ) {
$t_color = $t_color_project;
if ( $p_set_override ) {
if ( $p_set_override && ALL_PROJECTS != $t_project_id ) {
set_overrides( $p_threshold );
}

Expand Down

0 comments on commit cf72f3d

Please sign in to comment.