forked from extern/egroupware
Stop using a preference for selection default. If the definition has a filter set, use filter, otherwise default to search results
This commit is contained in:
parent
2b952c0157
commit
8a3f81c77c
@ -212,11 +212,6 @@ class importexport_export_ui {
|
||||
}
|
||||
else
|
||||
{
|
||||
if($definition->filter)
|
||||
{
|
||||
$content['selection'] = 'filter';
|
||||
}
|
||||
|
||||
// Process relative dates into the current absolute date
|
||||
foreach($content['filter']['fields'] as $field => $settings)
|
||||
{
|
||||
@ -235,13 +230,10 @@ class importexport_export_ui {
|
||||
|
||||
$preserv['old_definition'] = $content['definition'];
|
||||
|
||||
// If not set by plugin, pre-set selection to preference, or 'search'
|
||||
if (($prefs = $GLOBALS['egw_info']['user']['preferences']['importexport'][$definition->definition_id]) &&
|
||||
($prefs = unserialize($prefs)) && !$content['selection']['plugin_override'])
|
||||
// If not set by plugin, pre-set selection to filter if definition has one, or 'search'
|
||||
if (!$content['selection'] && $definition->filter)
|
||||
{
|
||||
$selection = $content['selection'];
|
||||
$content = array_merge_recursive($content,$prefs);
|
||||
$content['selection'] = $prefs['selection'] ? $prefs['selection'] : $selection;
|
||||
$content['selection'] = 'filter';
|
||||
}
|
||||
if(!$content['selection'])
|
||||
{
|
||||
@ -366,12 +358,6 @@ class importexport_export_ui {
|
||||
}
|
||||
}
|
||||
|
||||
// Keep settings
|
||||
$keep = array_diff_key($_content, array_flip(array('appname', 'definition', 'plugin', 'preview', 'export', $tabs)));
|
||||
$GLOBALS['egw']->preferences->add('importexport',$definition->definition_id,serialize($keep));
|
||||
// save prefs, but do NOT invalid the cache (unnecessary)
|
||||
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
||||
|
||||
// Store charset to use in header
|
||||
egw_cache::setSession('importexport', $tmpfname, $charset, 100);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user