logo       
Google Custom Search
    AddThis Social Bookmark Button

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

mantisbt/core print_api.php,1.119,1.120 filter_api.php,1.89,1.90: msg#00043

Subject: mantisbt/core print_api.php,1.119,1.120 filter_api.php,1.89,1.90
Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10795/core

Modified Files:
        print_api.php filter_api.php 
Log Message:
fix for 0005366: Some filter values don't make sense
cleanup of fix for 0005075: Add additional standard filter attributes
fixed highlighting of selection for custom fields


Index: print_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/print_api.php,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- print_api.php       21 Mar 2005 20:48:57 -0000      1.119
+++ print_api.php       21 Mar 2005 23:17:53 -0000      1.120
@@ -531,7 +531,7 @@
        # $p_version = currently selected version.
        # $p_project_id = project id, otherwise current project will be used.
        # $p_released = null to get all, 1: only released, 0: only future 
versions
-       function print_version_option_list( $p_version='', $p_project_id = 
null, $p_released = null ) {
+       function print_version_option_list( $p_version='', $p_project_id = 
null, $p_released = null, $p_leading_blank = true ) {
                if ( null === $p_project_id ) {
                        $c_project_id = helper_get_current_project();
                } else {
@@ -540,7 +540,9 @@
 
                $versions = version_get_all_rows( $c_project_id, $p_released );
 
-               echo '<option value=""></option>';
+               if ( $p_leading_blank ) {
+                       echo '<option value=""></option>';
+               }
                foreach( $versions as $version ) {
                        $t_version = string_shorten( string_attribute( 
$version['version'] ) );
                        echo "<option value=\"$t_version\"";

Index: filter_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- filter_api.php      14 Mar 2005 11:41:22 -0000      1.89
+++ filter_api.php      21 Mar 2005 23:17:54 -0000      1.90
@@ -1107,8 +1107,6 @@
                                                                                
$t_this_string = '';
                                                                                
if ( ( $t_current == META_FILTER_ANY ) || ( is_blank( $t_current ) ) ) {
                                                                                
        $t_any_found = true;
-                                                                               
} else if ( META_FILTER_NONE == $t_current ) {
-                                                                               
        $t_this_string = lang_get( 'none' );
                                                                                
} else {
                                                                                
        $t_this_string = $t_current;
                                                                                
}
@@ -2328,7 +2326,6 @@
                <!-- Category -->
                <select <?php PRINT $t_select_modifier;?> 
name="show_category[]">
                        <option value="[any]" <?php check_selected( 
$t_filter['show_category'], META_FILTER_ANY ); ?>>[<?php echo lang_get( 'any' ) 
?>]</option>
-                       <option value="[none]" <?php check_selected( 
$t_filter['show_category'], META_FILTER_NONE ); ?>>[<?php echo lang_get( 'none' 
) ?>]</option>
                        <?php # This shows orphaned categories as well as 
selectable categories ?>
                        <?php print_category_complete_option_list( 
$t_filter['show_category'] ) ?>
                </select>
@@ -2392,7 +2389,7 @@
                <select <?php PRINT $t_select_modifier;?> name="show_version[]">
                        <option value="[any]" <?php check_selected( 
$t_filter['show_version'], META_FILTER_ANY ); ?>>[<?php echo lang_get( 'any' ) 
?>]</option>
                        <option value="[none]" <?php check_selected( 
$t_filter['show_version'], META_FILTER_NONE ); ?>>[<?php echo lang_get( 'none' 
) ?>]</option>
-                       <?php print_version_option_list( 
$t_filter['show_version'], null, VERSION_RELEASED ) ?>
+                       <?php print_version_option_list( 
$t_filter['show_version'], null, VERSION_RELEASED, false ) ?>
                </select>
                <?php
        }
@@ -2403,7 +2400,7 @@
                <select <?php PRINT $t_select_modifier;?> 
name="fixed_in_version[]">
                        <option value="[any]" <?php check_selected( 
$t_filter['fixed_in_version'], META_FILTER_ANY ); ?>>[<?php echo lang_get( 
'any' ) ?>]</option>
                        <option value="[none]" <?php check_selected( 
$t_filter['fixed_in_version'], META_FILTER_NONE ); ?>>[<?php echo lang_get( 
'none' ) ?>]</option>
-                       <?php print_version_option_list( 
$t_filter['fixed_in_version'], null, VERSION_ALL ) ?>
+                       <?php print_version_option_list( 
$t_filter['fixed_in_version'], null, VERSION_ALL, false ) ?>
                </select>
                <?php
        }
@@ -2563,12 +2560,12 @@
                        } else {
                                echo '<select ' . $t_select_modifier . ' 
name="custom_field_' . $p_field_id .'[]">';
                                echo '<option value="[any]" ';
-                               check_selected( $t_filter['custom_fields'][ 
$p_field_id ], 'any' );
+                               check_selected( $t_filter['custom_fields'][ 
$p_field_id ], '[any]' );
                                echo '>[' . lang_get( 'any' ) .']</option>';
                                # don't show META_FILTER_NONE for enumerated 
types as it's not possible for them to be blank
                                if ( ! in_array( 
$t_accessible_custom_fields_types[$j], array( CUSTOM_FIELD_TYPE_ENUM, 
CUSTOM_FIELD_TYPE_LIST, CUSTOM_FIELD_TYPE_MULTILIST ) ) ) {
                                        echo '<option value="[none]" ';
-                                       check_selected( 
$t_filter['custom_fields'][ $p_field_id ], 'any' );
+                                       check_selected( 
$t_filter['custom_fields'][ $p_field_id ], '[none]' );
                                        echo '>[' . lang_get( 'none' ) 
.']</option>';
                                }
                                foreach( $t_accessible_custom_fields_values[$j] 
as $t_item ) {



-------------------------------------------------------
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



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>