logo       

mantisbt manage_config_work_threshold_set.php,1.4,1.5: msg#00039

Subject: mantisbt manage_config_work_threshold_set.php,1.4,1.5
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe