diff --git a/importexport/inc/class.importexport_export_ui.inc.php b/importexport/inc/class.importexport_export_ui.inc.php index fa01e07523..6a2fec22e6 100644 --- a/importexport/inc/class.importexport_export_ui.inc.php +++ b/importexport/inc/class.importexport_export_ui.inc.php @@ -303,6 +303,12 @@ class importexport_export_ui { { unset($filter[$key]); } + // If user selects an end date, they most likely want entries including that date + if(is_array($value) && array_key_exists('to',$value) && $value['to'] ) + { + // Adjust time to 23:59:59 + $filter[$key]['to'] = mktime(23,59,59,date('n',$value['to']),date('j',$value['to']),date('Y',$value['to'])); + } } unset($_content['filter']); $definition->filter = $filter; 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 e81e2b27ab..9d8945d086 100644 --- a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php @@ -31,7 +31,7 @@ class importexport_wizard_basic_export_csv protected $step_templates = array( 'wizard_step30' => 'importexport.wizard_basic_export_csv.choose_fields', 'wizard_step40' => 'importexport.wizard_basic_export_csv.choosesepncharset', - 'wizard_step50' => 'importexport.wizard_basic_export_csv.filter', + 'wizard_step80' => 'importexport.wizard_basic_export_csv.filter', ); @@ -59,7 +59,7 @@ class importexport_wizard_basic_export_csv $this->steps = array( 'wizard_step30' => lang('Choose fields to export'), 'wizard_step40' => lang('Choose seperator and charset'), - 'wizard_step50' => lang('Filters'), + 'wizard_step80' => lang('Filters'), ); list($appname, $part2) = explode('_', get_class($this)); if(!$GLOBALS['egw_info']['apps'][$appname]) $appname .= '_'.$part2; // Handle apps with _ in the name @@ -233,11 +233,11 @@ class importexport_wizard_basic_export_csv * @param array $preserv * @return string template name */ - function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv) + function wizard_step80(&$content, &$sel_options, &$readonlys, &$preserv) { if($this->debug) error_log(get_class($this) . '::' . __METHOD__ .'->$content '.print_r($content,true)); // return from submit - if ($content['step'] == 'wizard_step50') { + if ($content['step'] == 'wizard_step80') { // Process submitted unset($content['filter']); unset($content['set_filter']['fields']); @@ -259,13 +259,13 @@ class importexport_wizard_basic_export_csv case 'finish': return 'wizard_finish'; default : - return $this->wizard_step50($content,$sel_options,$readonlys,$preserv); + return $this->wizard_step80($content,$sel_options,$readonlys,$preserv); } } else { // Step 50 - filters - $content['msg'] = $this->steps['wizard_step50']; - $content['step'] = 'wizard_step50'; + $content['msg'] = $this->steps['wizard_step80']; + $content['step'] = 'wizard_step80'; // Find filterable fields if(!$content['set_filter'] && $content['filter']) {