? adm_config_edit.php Index: adm_config_report.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/adm_config_report.php,v retrieving revision 1.9 diff -u -r1.9 adm_config_report.php --- adm_config_report.php 1 Apr 2007 06:30:24 -0000 1.9 +++ adm_config_report.php 8 Aug 2007 22:30:48 -0000 @@ -126,6 +126,7 @@ ( $row = db_fetch_array( $result ) ) ) { + $t_config = $row['config_id']; + $t_user = $row['user_id']; + $t_project = $row['project_id']; + $g_cache_config[$t_config][$t_user][$t_project] = $row['type'] . ';' . $row['value']; + $g_cache_config_access[$t_config][$t_user][$t_project] = $row['access_reqd']; + } + $g_cache_filled = true; + } + + if( isset( $g_cache_config[$p_option] ) ) { + $t_found = false; + reset( $t_users ); + while ( ( list( , $t_user ) = each( $t_users ) ) && ! $t_found ) { + reset( $t_projects ); + while ( ( list( , $t_project ) = each( $t_projects ) ) && ! $t_found ) { + if ( isset( $g_cache_config[$p_option][$t_user][$t_project] ) ) { + $t_value = $g_cache_config[$p_option][$t_user][$t_project]; + $t_found = true; + } + } + } + + if ( $t_found ) { + list( $t_type, $t_raw_value ) = explode( ';', $t_value, 2 ); + + switch ( $t_type ) { + case CONFIG_TYPE_INT: + $t_value = (int) $t_raw_value; + break; + case CONFIG_TYPE_COMPLEX: + $t_value = unserialize( $t_raw_value ); + break; + case CONFIG_TYPE_STRING: + default: + $t_value = config_eval( $t_raw_value ); + } + return $t_type; + } + } + } + } + return CONFIG_TYPE_STRING; + } # ------------------ # Retrieves the access level needed to change a config value