mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Used passed appname when creating new categories
This commit is contained in:
parent
15bac6b211
commit
630720a662
@ -314,6 +314,11 @@ class importexport_import_csv implements importexport_iface_import_record { //,
|
|||||||
if($record[$name]) $record[$name] = ExecMethod($method, $record[$name]);
|
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) {
|
foreach((array)$fields['select-cat'] as $name) {
|
||||||
if($record[$name]) {
|
if($record[$name]) {
|
||||||
$cat_id = importexport_helper_functions::cat_name2id($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;
|
if($cat_id) $record[$name] = $cat_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$GLOBALS['egw_info']['flags']['currentapp'] = $current_app;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user