Used passed appname when creating new categories

This commit is contained in:
Nathan Gray 2011-04-04 19:05:15 +00:00
parent 15bac6b211
commit 630720a662

View File

@ -314,6 +314,11 @@ class importexport_import_csv implements importexport_iface_import_record { //,
if($record[$name]) $record[$name] = ExecMethod($method, $record[$name]);
}
// cat_name2id will use currentapp to create new categories
$current_app = $GLOBALS['egw_info']['flags']['currentapp'];
if($appname) {
$GLOBALS['egw_info']['flags']['currentapp'] = $appname;
}
foreach((array)$fields['select-cat'] as $name) {
if($record[$name]) {
$cat_id = importexport_helper_functions::cat_name2id($record[$name]);
@ -321,6 +326,7 @@ class importexport_import_csv implements importexport_iface_import_record { //,
if($cat_id) $record[$name] = $cat_id;
}
}
$GLOBALS['egw_info']['flags']['currentapp'] = $current_app;
}
return;