Glenn Henshaw | 1 Apr 2005 04:43
Picon

mantisbt/core filter_api.php,1.93,1.94

Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4116/core

Modified Files:
	filter_api.php 
Log Message:
fix for 0005394: select multiple 'assigned to' then change 'hide status' and value is ignored
  - suppress "Hide Status" filter in advanced mode
simplify advanced/simple filter switch in dhtml filter mode

Index: filter_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/filter_api.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -d -r1.93 -r1.94
--- filter_api.php	24 Mar 2005 02:55:23 -0000	1.93
+++ filter_api.php	1 Apr 2005 02:43:16 -0000	1.94
 <at>  <at>  -1200,7 +1200,9  <at>  <at> 
 				<a href="<?php PRINT $t_filters_url . 'show_status[]'; ?>" id="show_status_filter"><?php PRINT
lang_get( 'status' ) ?>:</a>
 			</td>
 			<td class="small-caption" valign="top">
-				<a href="<?php PRINT $t_filters_url . 'hide_status[]'; ?>" id="hide_status_filter"><?php
PRINT lang_get( 'hide_status' ) ?>:</a>
+				<?php if ( 'simple' == $t_view_type ) { ?>
+					<a href="<?php PRINT $t_filters_url . 'hide_status[]'; ?>" id="hide_status_filter"><?php
PRINT lang_get( 'hide_status' ) ?>:</a>
+				<?php } ?>
 			</td>
 			<td class="small-caption" valign="top">
 				<a href="<?php PRINT $t_filters_url . 'show_build[]'; ?>" id="show_build_filter"><?php PRINT
lang_get( 'product_build' ) ?>:</a>
 <at>  <at>  -1261,37 +1263,39  <at>  <at> 
 			</td>
 			<td class="small-caption" valign="top" id="hide_status_filter_target">
 							<?php
-								$t_output = '';
-								$t_none_found = false;
-								if ( count( $t_filter['hide_status'] ) == 0 ) {
-									PRINT lang_get( 'none' );
-								} else {
-									$t_first_flag = true;
-									foreach( $t_filter['hide_status'] as $t_current ) {
-										?>
-										<input type="hidden" name="hide_status[]" value="<?php echo $t_current;?>" />
-										<?php
-										$t_this_string = '';
-										if ( ( $t_current == META_FILTER_NONE ) || ( is_blank( $t_current ) ) || ( $t_current === 0 ) ) {
-											$t_none_found = true;
-										} else {
-											$t_this_string = get_enum_element( 'status', $t_current );
+								if ( 'simple' == $t_view_type ) { 
+									$t_output = '';
+									$t_none_found = false;
+									if ( count( $t_filter['hide_status'] ) == 0 ) {
+										PRINT lang_get( 'none' );
+									} else {
+										$t_first_flag = true;
+										foreach( $t_filter['hide_status'] as $t_current ) {
+											?>
+											<input type="hidden" name="hide_status[]" value="<?php echo $t_current;?>" />
+											<?php
+											$t_this_string = '';
+											if ( ( $t_current == META_FILTER_NONE ) || ( is_blank( $t_current ) ) || ( $t_current === 0 ) ) {
+												$t_none_found = true;
+											} else {
+												$t_this_string = get_enum_element( 'status', $t_current );
+											}
+											if ( $t_first_flag != true ) {
+												$t_output = $t_output . '<br>';
+											} else {
+												$t_first_flag = false;
+											}
+											$t_output = $t_output . $t_this_string;
 										}
-										if ( $t_first_flag != true ) {
-											$t_output = $t_output . '<br>';
+										$t_hide_status_post = '';
+										if ( count( $t_filter['hide_status'] ) == 1 ) {
+											$t_hide_status_post = ' (' . lang_get( 'and_above' ) . ')';
+										}
+										if ( true == $t_none_found ) {
+											PRINT lang_get( 'none' );
 										} else {
-											$t_first_flag = false;
+											PRINT $t_output . $t_hide_status_post;
 										}
-										$t_output = $t_output . $t_this_string;
-									}
-									$t_hide_status_post = '';
-									if ( count( $t_filter['hide_status'] ) == 1 ) {
-										$t_hide_status_post = ' (' . lang_get( 'and_above' ) . ')';
-									}
-									if ( true == $t_none_found ) {
-										PRINT lang_get( 'none' );
-									} else {
-										PRINT $t_output . $t_hide_status_post;
 									}
 								}
 							?>
 <at>  <at>  -1760,7 +1764,11  <at>  <at> 
 			</form>
 			<td class="center">
 				<?php
-					$f_switch_view_link = 'view_filters_page.php?view_type=';
+					if ( ON == config_get( 'dhtml_filters' ) ) {
+						$f_switch_view_link = 'view_all_set.php?type=6&view_type=';
+					} else {
+						$f_switch_view_link = 'view_filters_page.php?view_type=';
+					}					

 					if ( ( SIMPLE_ONLY != config_get( 'view_filters' ) ) && ( ADVANCED_ONLY != config_get(
'view_filters' ) ) ) {
 						if ( 'advanced' == $t_view_type ) {

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30

Gmane