forked from extern/egroupware
Avoid some errors from apps/plugins that don't do filters
This commit is contained in:
parent
81a674cd8c
commit
21fdd9abf2
@ -130,7 +130,7 @@ class importexport_definition implements importexport_iface_egw_record {
|
||||
case 'plugin_options' :
|
||||
return $this->set_options($_data);
|
||||
case 'filter':
|
||||
return $this->set_filter($_data);
|
||||
return $this->set_filter((Array)$_data);
|
||||
default :
|
||||
$this->definition[$_attribute_name] = $_data;
|
||||
return;
|
||||
|
@ -194,7 +194,7 @@ class importexport_export_ui {
|
||||
}
|
||||
|
||||
// fill selection tab
|
||||
if($definition && $definition->plugin_options['selection'] && !$content['selection_passed']) {
|
||||
if($definition && is_array($definition->plugin_options) && $definition->plugin_options['selection'] && !$content['selection_passed']) {
|
||||
$_selection = $definition->plugin_options['selection'];
|
||||
}
|
||||
|
||||
@ -291,6 +291,8 @@ class importexport_export_ui {
|
||||
// Set filter
|
||||
// Note that because not all dates are DB dates, the plugin has to handle them
|
||||
$filter = $definition->filter;
|
||||
if(is_array($_content['filter']))
|
||||
{
|
||||
foreach($_content['filter'] as $key => $value)
|
||||
{
|
||||
// Handle multiple values
|
||||
@ -310,6 +312,7 @@ class importexport_export_ui {
|
||||
$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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user