diff --git a/core_email_API.php b/core_email_API.php index 1dd743e3c7..80d390fe13 100644 --- a/core_email_API.php +++ b/core_email_API.php @@ -273,11 +273,6 @@ function email_build_bug_message( $p_bug_id ) { $s_email_duplicate, $s_email_date_submitted, $s_email_last_modified, $s_email_summary, $s_email_description, - $s_resolution_enum_string, - $s_severity_enum_string, - $s_priority_enum_string, - $s_status_enum_string, - $s_reproducibility_enum_string, $g_email_separator1, $g_email_padding_length; diff --git a/core_helper_API.php b/core_helper_API.php index 4b9c65df21..0a8d2416e4 100644 --- a/core_helper_API.php +++ b/core_helper_API.php @@ -364,13 +364,14 @@ function get_enum_element( $p_enum_name, $p_val ) { $s_var = "s_".$p_enum_name."_enum_string"; global $$g_var, $$s_var; - return get_enum_to_string( $$s_var, $p_val ); + # use the global enum string to search $t_arr = explode_enum_string( $$g_var ); $t_arr_count = count( $t_arr ); for ( $i=0;$i<$t_arr_count;$i++ ) { $elem_arr = explode_enum_arr( $t_arr[$i] ); if ( $elem_arr[0] == $p_val ) { - get_enum_to_string( $$s_var, $elem_arr[0] ); + # now get the appropriate translation + return get_enum_to_string( $$s_var, $p_val ); } } return "@null@"; diff --git a/core_html_API.php b/core_html_API.php index 2e1936589a..b54f27b296 100644 --- a/core_html_API.php +++ b/core_html_API.php @@ -508,7 +508,7 @@ function print_mantis_error( $p_error_num=0 ) { # -------------------- # Print the color legend for the colors function print_status_colors() { - global $g_status_enum_string, $s_status_enum_string, + global $g_status_enum_string, $g_new_color, $g_feedback_color, $g_acknowledged_color, $g_confirmed_color, $g_assigned_color, $g_resolved_color, diff --git a/core_print_API.php b/core_print_API.php index 9362177588..e992afb875 100644 --- a/core_print_API.php +++ b/core_print_API.php @@ -426,20 +426,25 @@ function print_enum_string_option_list( $p_enum_name, $p_val=0 ) { } # end for } # -------------------- - function print_project_user_option_list( $p_val=0 ) { - global $g_mantis_project_table, $s_access_levels_enum_string; + # prints the list of access levels exluding ADMINISTRATOR + # this is used when adding users to projects + function print_project_user_option_list( $p_val ) { + global $g_mantis_project_table, $g_access_levels_enum_string; - $t_arr = explode_enum_string( $s_access_levels_enum_string ); + $t_arr = explode_enum_string( $g_access_levels_enum_string ); $enum_count = count( $t_arr ); for ($i=0;$i<$enum_count;$i++) { $t_elem = explode_enum_arr( $t_arr[$i] ); - if ( ADMINISTRATOR == $t_elem[0] ) { continue; } + if ( $t_elem[0] >= ADMINISTRATOR ) { + continue; + } + $t_access_level = get_enum_element( "access_levels", $t_elem[0] ); if ( $p_val == $t_elem[0] ) { - PRINT ""; + PRINT ""; } else { - PRINT ""; + PRINT ""; } } # end for } diff --git a/core_summary_API.php b/core_summary_API.php index 04a6d63e29..81617c9977 100644 --- a/core_summary_API.php +++ b/core_summary_API.php @@ -65,7 +65,7 @@ function print_bug_enum_summary( $p_enum_string, $p_enum ) { PRINT "