Skip to content

Commit ac7effb

Browse files
committedSep 3, 2012
Fix filter not applied when category has a ' in his name
Implemented by removing calls to db_prepare_* functions in filter_ensure_valid_filter(). Fixes #11605
1 parent 9344b94 commit ac7effb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

Diff for: ‎core/filter_api.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -706,10 +706,10 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
706706
$t_filter_value = META_FILTER_NONE;
707707
}
708708
if( 'string' == $t_multi_field_type ) {
709-
$t_checked_array[] = db_prepare_string( $t_filter_value );
709+
$t_checked_array[] = $t_filter_value;
710710
}
711711
else if( 'int' == $t_multi_field_type ) {
712-
$t_checked_array[] = db_prepare_int( $t_filter_value );
712+
$t_checked_array[] = (int)$t_filter_value;
713713
}
714714
else if( 'array' == $t_multi_field_type ) {
715715
$t_checked_array[] = $t_filter_value;
@@ -737,7 +737,7 @@ function filter_ensure_valid_filter( $p_filter_arr ) {
737737
if(( $t_filter_value === 'any' ) || ( $t_filter_value === '[any]' ) ) {
738738
$t_filter_value = META_FILTER_ANY;
739739
}
740-
$t_checked_array[] = db_prepare_string( $t_filter_value );
740+
$t_checked_array[] = $t_filter_value;
741741
}
742742
$p_filter_arr['custom_fields'][$t_cfid] = $t_checked_array;
743743
}

0 commit comments

Comments
 (0)
Please sign in to comment.