Update of /cvsroot/mantisbt/mantisbt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14081
Modified Files:
manage_config_work_threshold_set.php
Log Message:
fix for 0005438: *_bug_threshold set to an array in the new DB based
configuration
- sort access levels before determining thresholds in config*set.php
- fix improper access level comparisons in changelog_page, core/filter_api,
core/print_api, and core/project_api
- rework project_get_all_user_rows() to make it faster and handle private
projects properly (i.e., include those in config private_project_threshold)
Index: manage_config_work_threshold_set.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/manage_config_work_threshold_set.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- manage_config_work_threshold_set.php 3 Apr 2005 12:43:31 -0000
1.4
+++ manage_config_work_threshold_set.php 15 Apr 2005 22:07:23 -0000
1.5
@@ -28,28 +28,28 @@
if ( ( $t_access >= config_get_access( $p_threshold ) )
&& ( ( ALL_PROJECTS == $t_project ) || !
$p_all_projects_only ) ) {
- $f_threshold = gpc_get( 'flag_thres_' . $p_threshold );
+ $f_threshold = gpc_get_int_array( 'flag_thres_' . $p_threshold
);
$f_access = gpc_get_int( 'access_' . $p_threshold );
# @@debug @@ echo "<br />for $p_threshold ";
var_dump($f_threshold, $f_access); echo '<br />';
- $t_access_levels = explode_enum_string( config_get(
'access_levels_enum_string' ) );
+ $t_access_levels = get_enum_to_array( config_get(
'access_levels_enum_string' ) );
+ ksort( $t_access_levels );
+ reset( $t_access_levels );
$t_lower_threshold = ANYBODY;
$t_array_threshold = array();
- foreach( $t_access_levels as $t_access_level ) {
- $t_entry_array = explode_enum_arr( $t_access_level
);
- $t_set = $t_entry_array[0];
- if ( in_array( $t_set, $f_threshold ) ) {
+ foreach( $t_access_levels as $t_access_level =>
$t_level_name ) {
+ if ( in_array( $t_access_level, $f_threshold ) ) {
if ( ANYBODY == $t_lower_threshold ) {
- $t_lower_threshold = $t_set;
+ $t_lower_threshold = $t_access_level;
}
- $t_array_threshold[] = $t_set;
+ $t_array_threshold[] = $t_access_level;
} else {
if ( ANYBODY <> $t_lower_threshold ) {
$t_lower_threshold = -1;
}
}
- # @@debug @@ var_dump($t_set, $t_lower_threshold,
$t_array_threshold); echo '<br />';
+ # @@debug @@ var_dump($$t_access_level, $t_lower_threshold,
$t_array_threshold); echo '<br />';
}
if ( -1 == $t_lower_threshold ) {
config_set( $p_threshold, $t_array_threshold, NO_USER,
$t_project, $f_access );
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
|