fixed not working importexport: preferences can NOT store arrays, they need to be serialized before

This commit is contained in:
Ralf Becker 2010-11-23 15:25:22 +00:00
parent 4769db9539
commit 3ccf4a3587

View File

@ -173,7 +173,11 @@ class importexport_export_ui {
disable_button('exec[export]');
");
}
$content = array_merge($content,(array)$GLOBALS['egw_info']['user']['preferences']['importexport'][$definition->definition_id]);
if (($prefs = $GLOBALS['egw_info']['user']['preferences']['importexport'][$definition->definition_id]) &&
($prefs = unserialize($prefs)))
{
$content = array_merge($content,$prefs);
}
unset ($plugin_object);
(array)$apps = importexport_helper_functions::get_apps('export');
$sel_options['appname'] = array('' => lang('Select one')) + array_combine($apps,$apps);
@ -233,7 +237,7 @@ 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,$keep);
$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);