Hopefully better fix for cleared filters sticking around

This commit is contained in:
Nathan Gray 2013-01-31 16:20:23 +00:00
parent a8e6f13304
commit 8f1ab82083
2 changed files with 4 additions and 6 deletions

View File

@ -24,8 +24,6 @@
class filter_widget extends customfields_widget
{
// etemplate process_exec has trouble with the nulls, and returns the previous value
const ALL_DATES = '-all-';
public $prefix = '';
public $human_name = array(
'filter' => 'Import|Export filter'
@ -217,7 +215,7 @@ error_log('Trying to filter with unsupported field type: ' . $field['type']);
'readonly' => $readonly,
'no_lang' => true,
'options' => $options,
'sel_options' => array(self::ALL_DATES => lang('all'))
'sel_options' => array('' => lang('all'))
));
foreach(importexport_helper_functions::$relative_dates as $label => $values)
{

View File

@ -243,7 +243,7 @@ class importexport_wizard_basic_export_csv
unset($content['set_filter']['fields']);
foreach($content['set_filter'] as $key => $value)
{
if($value && $value != '-all-') {
if($value) {
$content['filter'][$key] = $value;
}
}
@ -266,6 +266,8 @@ class importexport_wizard_basic_export_csv
// Step 50 - filters
$content['msg'] = $this->steps['wizard_step80'];
$content['step'] = 'wizard_step80';
$preserv = $content;
unset ($preserv['button']);
$content['set_filter']['fields'] = importexport_helper_functions::get_filter_fields(
$content['application'],$content['plugin'],$this
@ -283,8 +285,6 @@ class importexport_wizard_basic_export_csv
}
$sel_options = array();
$preserv = $content;
unset ($preserv['button']);
return $this->step_templates[$content['step']];
}
}