Index: trunk/core/units/general/cat_dbitem_export.php =================================================================== diff -u -N -r5514 -r5536 --- trunk/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 5514) +++ trunk/core/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 5536) @@ -667,6 +667,7 @@ function getItemCategory() { + static $lang_prefix = null; $backup_category_id = $this->Application->GetVar('m_cat_id'); $category_id = $this->getFromCache('category_names', implode(':', $this->curItem->CategoryPath)); @@ -675,6 +676,10 @@ return $category_id; } + if (is_null($lang_prefix)) { + $lang_prefix = 'l'.$this->Application->GetVar('m_lang').'_'; + } + foreach ($this->curItem->CategoryPath as $category_index => $category_name) { if (!$category_name) continue; $category_key = crc32( implode(':', array_slice($this->curItem->CategoryPath, 0, $category_index + 1) ) ); @@ -688,12 +693,12 @@ // get category id from database by name $sql = 'SELECT CategoryId FROM '.TABLE_PREFIX.'Category - WHERE (Name = '.$this->Conn->qstr($category_name).') AND (ParentId = '.$current_category_id.')'; + WHERE ('.$lang_prefix.'Name = '.$this->Conn->qstr($category_name).') AND (ParentId = '.$current_category_id.')'; $category_id = $this->Conn->GetOne($sql); if ($category_id === false) { // category not in db -> create - $category_fields = Array( 'Name' => $category_name, 'Description' => $category_name, + $category_fields = Array( $lang_prefix.'Name' => $category_name, $lang_prefix.'Description' => $category_name, 'Status' => STATUS_ACTIVE, 'ParentId' => $current_category_id, 'AutomaticFilename' => 1 ); $this->dummyCategory->SetDBFieldsFromHash($category_fields); Index: trunk/kernel/admin_templates/xml/tree_categories.tpl =================================================================== diff -u -N -r4996 -r5536 --- trunk/kernel/admin_templates/xml/tree_categories.tpl (.../tree_categories.tpl) (revision 4996) +++ trunk/kernel/admin_templates/xml/tree_categories.tpl (.../tree_categories.tpl) (revision 5536) @@ -1,6 +1,6 @@ - " icon="img/icons/icon24_catalog.gif" href="" onclick="checkCatalog()" load_url=""> + " icon="img/icons/icon24_catalog.gif" href="" onclick="checkCatalog()" load_url=""> Index: trunk/core/admin_templates/categories/xml/tree_categories.tpl =================================================================== diff -u -N -r4996 -r5536 --- trunk/core/admin_templates/categories/xml/tree_categories.tpl (.../tree_categories.tpl) (revision 4996) +++ trunk/core/admin_templates/categories/xml/tree_categories.tpl (.../tree_categories.tpl) (revision 5536) @@ -1,6 +1,6 @@ - " icon="img/icons/icon24_catalog.gif" href="" onclick="checkCatalog()" load_url=""> + " icon="img/icons/icon24_catalog.gif" href="" onclick="checkCatalog()" load_url=""> Index: trunk/kernel/units/general/cat_tag_processor.php =================================================================== diff -u -N -r5219 -r5536 --- trunk/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5219) +++ trunk/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5536) @@ -118,7 +118,12 @@ { if ($this->Special == 'import') { $this->Application->StoreVar('PermCache_UpdateRequired', 1); + $this->Application->Redirect('categories/cache_updater', Array('pass' => 'm', 'continue' => 1, 'no_amp' => 1)); } + elseif ($this->Special == 'export') { + $template = $this->Application->getUnitOption($this->Prefix, 'ModuleFolder').'/'.$this->Special.'_finish'; + $this->Application->Redirect($template, Array('pass' => 'all')); + } } $export_options = $export_object->loadOptions($event); Index: trunk/core/units/general/cat_tag_processor.php =================================================================== diff -u -N -r5219 -r5536 --- trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5219) +++ trunk/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5536) @@ -118,7 +118,12 @@ { if ($this->Special == 'import') { $this->Application->StoreVar('PermCache_UpdateRequired', 1); + $this->Application->Redirect('categories/cache_updater', Array('pass' => 'm', 'continue' => 1, 'no_amp' => 1)); } + elseif ($this->Special == 'export') { + $template = $this->Application->getUnitOption($this->Prefix, 'ModuleFolder').'/'.$this->Special.'_finish'; + $this->Application->Redirect($template, Array('pass' => 'all')); + } } $export_options = $export_object->loadOptions($event); Index: trunk/kernel/units/general/cat_dbitem_export.php =================================================================== diff -u -N -r5514 -r5536 --- trunk/kernel/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 5514) +++ trunk/kernel/units/general/cat_dbitem_export.php (.../cat_dbitem_export.php) (revision 5536) @@ -667,6 +667,7 @@ function getItemCategory() { + static $lang_prefix = null; $backup_category_id = $this->Application->GetVar('m_cat_id'); $category_id = $this->getFromCache('category_names', implode(':', $this->curItem->CategoryPath)); @@ -675,6 +676,10 @@ return $category_id; } + if (is_null($lang_prefix)) { + $lang_prefix = 'l'.$this->Application->GetVar('m_lang').'_'; + } + foreach ($this->curItem->CategoryPath as $category_index => $category_name) { if (!$category_name) continue; $category_key = crc32( implode(':', array_slice($this->curItem->CategoryPath, 0, $category_index + 1) ) ); @@ -688,12 +693,12 @@ // get category id from database by name $sql = 'SELECT CategoryId FROM '.TABLE_PREFIX.'Category - WHERE (Name = '.$this->Conn->qstr($category_name).') AND (ParentId = '.$current_category_id.')'; + WHERE ('.$lang_prefix.'Name = '.$this->Conn->qstr($category_name).') AND (ParentId = '.$current_category_id.')'; $category_id = $this->Conn->GetOne($sql); if ($category_id === false) { // category not in db -> create - $category_fields = Array( 'Name' => $category_name, 'Description' => $category_name, + $category_fields = Array( $lang_prefix.'Name' => $category_name, $lang_prefix.'Description' => $category_name, 'Status' => STATUS_ACTIVE, 'ParentId' => $current_category_id, 'AutomaticFilename' => 1 ); $this->dummyCategory->SetDBFieldsFromHash($category_fields);