From 8f1ab82083ca87b01acdd37789b8e8be83ef0d1b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 31 Jan 2013 16:20:23 +0000 Subject: [PATCH] Hopefully better fix for cleared filters sticking around --- importexport/inc/class.filter_widget.inc.php | 4 +--- .../inc/class.importexport_wizard_basic_export_csv.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/importexport/inc/class.filter_widget.inc.php b/importexport/inc/class.filter_widget.inc.php index 959ff23bb1..d3200d5b75 100644 --- a/importexport/inc/class.filter_widget.inc.php +++ b/importexport/inc/class.filter_widget.inc.php @@ -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) { diff --git a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php index 9b439902fc..ada2942ee9 100644 --- a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php @@ -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']]; } }