From 630720a66224e01ac32ed7fbe31f6f40532f2c7f Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 4 Apr 2011 19:05:15 +0000 Subject: [PATCH] Used passed appname when creating new categories --- importexport/inc/class.importexport_import_csv.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/importexport/inc/class.importexport_import_csv.inc.php b/importexport/inc/class.importexport_import_csv.inc.php index 1c547104d7..8bf7110596 100755 --- a/importexport/inc/class.importexport_import_csv.inc.php +++ b/importexport/inc/class.importexport_import_csv.inc.php @@ -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;