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);