Index: trunk/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r4730 -r4842 --- trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4730) +++ trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4842) @@ -34,15 +34,15 @@ } } - if ($event->Name == 'OnExport') { // save category_id before doing export $this->Application->LinkVar('m_cat_id'); } if ($event->Name == 'OnNew' && preg_match('/(.*)\/import$/', $this->Application->GetVar('t'), $rets)) { // redirect to item import template, where permission (import) category will be chosen) - $this->Application->StoreVar('m_cat_id', $this->Application->findModule('Path', $rets[1].'/', 'RootCat')); + $root_category = $this->Application->findModule('Path', $rets[1].'/', 'RootCat'); + $this->Application->StoreVar('m_cat_id', $root_category); } return parent::CheckPermission($event);