Skip to content

Commit

Permalink
Fix 7849: filters on custom date field causes SQL error
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4373 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
giallu committed May 27, 2007
1 parent 92fe568 commit 1faaa8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/filter_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: filter_api.php,v 1.154 2007-05-21 06:34:10 vboctor Exp $
# $Id: filter_api.php,v 1.155 2007-05-27 22:31:59 giallu Exp $
# --------------------------------------------------------

$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -1102,11 +1102,11 @@ function filter_get_bug_rows( &$p_page_number, &$p_per_page, &$p_page_count, &$p
break ;
case CUSTOM_FIELD_DATE_AFTER:
array_push( $t_join_clauses, $t_cf_join_clause );
$t_custom_where_clause = '(( ' . $t_table_name . '.value+0) > ' . ($t_filter['custom_fields'][$t_cfid][1]+1) . ')' ;
$t_custom_where_clause = '( (' . $t_table_name . '.value+0) > ' . ($t_filter['custom_fields'][$t_cfid][1]+1) ;
break ;
default:
array_push( $t_join_clauses, $t_cf_join_clause );
$t_custom_where_clause = '(( ' . $t_table_name . '.value+0) BETWEEN ' . $t_filter['custom_fields'][$t_cfid][1] . ' AND ' . $t_filter['custom_fields'][$t_cfid][2] . ')' ;
$t_custom_where_clause = '( (' . $t_table_name . '.value+0) BETWEEN ' . $t_filter['custom_fields'][$t_cfid][1] . ' AND ' . $t_filter['custom_fields'][$t_cfid][2];
break ;
}
} else {
Expand Down

0 comments on commit 1faaa8b

Please sign in to comment.