Index: branches/5.2.x/core/units/helpers/search_helper.php =================================================================== diff -u -N -r14699 -r14718 --- branches/5.2.x/core/units/helpers/search_helper.php (.../search_helper.php) (revision 14699) +++ branches/5.2.x/core/units/helpers/search_helper.php (.../search_helper.php) (revision 14718) @@ -1,6 +1,6 @@ getRangeValue($field_options['submit_value']['from']); $to = $this->getRangeValue($field_options['submit_value']['to']); - if ($from !== false && $to !== false) { + if ( $from !== false && $to !== false ) { // add range filter - $filter_value = $table_name.'`'.$field_name.'` >= '.$from.' AND '.$table_name.'`'.$field_name.'` <= '.$to; + $filter_value = $table_name . '`' . $field_name . '` >= ' . $from . ' AND ' . $table_name . '`' . $field_name . '` <= ' . $to; } - elseif ($from !== false) { - // add equals filter on $from - $filter_value = $table_name.'`'.$field_name.'` = '.$from; + elseif ( $field_type == 'int' || $field_type == 'integer' ) { + if ( $from !== false ) { + // add equals filter on $from + $filter_value = $table_name . '`' . $field_name . '` = ' . $from; + } + elseif ( $to !== false ) { + // add equals filter on $to + $filter_value = $table_name . '`' . $field_name . '` = ' . $to; + } } - elseif ($to !== false) { - // add equals filter on $to - $filter_value = $table_name.'`'.$field_name.'` = '.$to; + else { + // MySQL can't compare values in "float" type columns using "=" operator + if ( $from !== false ) { + // add equals filter on $from + $filter_value = 'ABS(' . $table_name . '`' . $field_name . '` - ' . $from . ') <= 0.0001'; + } + elseif ( $to !== false ) { + // add equals filter on $to + $filter_value = 'ABS(' . $table_name . '`' . $field_name . '` - ' . $to . ') <= 0.0001'; + } } break; - case 'float_range': - // MySQL can't compare values in "float" type columns using "=" operator - $from = $this->getRangeValue($field_options['submit_value']['from']); - $to = $this->getRangeValue($field_options['submit_value']['to']); - - if ($from !== false && $to !== false) { - // add range filter - $filter_value = $table_name.'`'.$field_name.'` >= '.$from.' AND '.$table_name.'`'.$field_name.'` <= '.$to; - } - elseif ($from !== false) { - // add equals filter on $from - $filter_value = 'ABS('.$table_name.'`'.$field_name.'` - '.$from.') <= 0.0001'; - } - elseif ($to !== false) { - // add equals filter on $to - $filter_value = 'ABS('.$table_name.'`'.$field_name.'` - '.$to.') <= 0.0001'; - } - break; - case 'date_range': $from = $this->processRangeField($object, $field_name, $field_options['submit_value'], 'from'); $to = $this->processRangeField($object, $field_name, $field_options['submit_value'], 'to'); Index: branches/5.2.x/core/units/agents/agents_config.php =================================================================== diff -u -N -r14670 -r14718 --- branches/5.2.x/core/units/agents/agents_config.php (.../agents_config.php) (revision 14670) +++ branches/5.2.x/core/units/agents/agents_config.php (.../agents_config.php) (revision 14718) @@ -1,6 +1,6 @@ Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), 'RunMode' => Array ('filter_block' => 'grid_options_filter', 'width' => 85, ), 'LastRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), - 'RunTime' => Array ('filter_block' => 'grid_float_range_filter', 'width' => 145, ), + 'RunTime' => Array ('filter_block' => 'grid_range_filter', 'width' => 145, ), 'LastRunStatus' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ), 'NextRunOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ), 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 65, ), Index: branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl =================================================================== diff -u -N -r14662 -r14718 --- branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 14662) +++ branches/5.2.x/core/admin_templates/incs/grid_blocks.tpl (.../grid_blocks.tpl) (revision 14718) @@ -394,34 +394,6 @@ - - - - - - - - - -
- " - value="" - style="width: " - onkeypress="search_keydown(event, '', '', '')"/> - - -
- " - value="" - style="width: " - onkeypress="search_keydown(event, '', '', '')"/> -
-
-