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 ""; PRINT ""; - echo get_enum_to_string( $p_enum_string, $t_s[0] ); + echo get_enum_element( $p_enum, $t_s[0] ); PRINT ""; PRINT ""; #PRINT "$open_bug_count $resolved_bug_count $closed_bug_count $t_enum_count"; diff --git a/doc/ChangeLog b/doc/ChangeLog index efd945d0fe..7325625b6c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -50,6 +50,7 @@ Mantis * Removed access_min and access threshold concepts from the user and project management. * Removed extra "echo" in news archive page. * Removed proj_user_delete_page.php. + * Removed dependency on s_ enum strings. Use g_ enum strings instead. * Updated Copyright to 2002. 03.15.2002 - 0.17.1 diff --git a/summary_page.php b/summary_page.php index 17bd62781c..90d2c91ca0 100644 --- a/summary_page.php +++ b/summary_page.php @@ -73,7 +73,7 @@ : - + @@ -97,7 +97,7 @@ : - + @@ -108,7 +108,7 @@ : - + @@ -132,7 +132,7 @@ : - +