Index: branches/unlabeled/unlabeled-1.10.2/core/units/categories/categories_item.php =================================================================== diff -u -r6842 -r7060 --- branches/unlabeled/unlabeled-1.10.2/core/units/categories/categories_item.php (.../categories_item.php) (revision 6842) +++ branches/unlabeled/unlabeled-1.10.2/core/units/categories/categories_item.php (.../categories_item.php) (revision 7060) @@ -14,7 +14,9 @@ $this->checkFilename(); $this->generateFilename(); - $this->SetDBField('ParentId', $this->Application->GetVar('m_cat_id') ); + $parent_category = $this->GetDBField('ParentId') > 0 ? $this->GetDBField('ParentId') : $this->Application->GetVar('m_cat_id'); + $this->SetDBField('ParentId', $parent_category); + $ret = parent::Create($force_id, $system_create); if ($ret) { $sql = 'UPDATE %s SET ParentPath = %s WHERE CategoryId = %s';