Index: branches/5.2.x/core/units/helpers/cat_dbitem_export_helper.php =================================================================== diff -u -N -r14959 -r15012 --- branches/5.2.x/core/units/helpers/cat_dbitem_export_helper.php (.../cat_dbitem_export_helper.php) (revision 14959) +++ branches/5.2.x/core/units/helpers/cat_dbitem_export_helper.php (.../cat_dbitem_export_helper.php) (revision 15012) @@ -1,6 +1,6 @@ curItem->TableName . ' item_table'; @@ -559,7 +559,7 @@ if ($this->exportOptions['IsBaseCategory'] ) { $sql = 'SELECT ParentPath - FROM '.TABLE_PREFIX.'Category + FROM '.TABLE_PREFIX.'Categories WHERE CategoryId = ' . (int)$this->Application->GetVar('m_cat_id'); $parent_path = $this->Conn->GetOne($sql); $parent_path = explode('|', substr($parent_path, 1, -1)); @@ -662,7 +662,7 @@ $current_category_id = $this->Application->GetVar('m_cat_id'); if ($current_category_id > 0) { - $sql = 'SELECT ParentPath FROM '.TABLE_PREFIX.'Category WHERE CategoryId = '.$current_category_id; + $sql = 'SELECT ParentPath FROM '.TABLE_PREFIX.'Categories WHERE CategoryId = '.$current_category_id; $this->exportOptions['ImportCategoryPath'] = $this->Conn->GetOne($sql); } else { @@ -825,7 +825,7 @@ // get category id from database by name $sql = 'SELECT CategoryId - FROM '.TABLE_PREFIX.'Category + FROM '.TABLE_PREFIX.'Categories WHERE ('.$lang_prefix.'Name = '.$this->Conn->qstr($category_name).') AND (ParentId = '.(int)$current_category_id.')'; $category_id = $this->Conn->GetOne($sql); @@ -928,7 +928,7 @@ FROM '.$this->curItem->TableName.' item_table LEFT JOIN '.$cdata_table.' custom_data ON custom_data.ResourceId = item_table.ResourceId LEFT JOIN '.TABLE_PREFIX.'CategoryItems ci ON ci.ItemResourceId = item_table.ResourceId - LEFT JOIN '.TABLE_PREFIX.'Category c ON c.CategoryId = ci.CategoryId + LEFT JOIN '.TABLE_PREFIX.'Categories c ON c.CategoryId = ci.CategoryId WHERE '.$where_clause; $item_id = $this->Conn->GetOne($sql); } @@ -995,7 +995,7 @@ $parent_path = $this->getFromCache('category_parent_path', $category_id); if ($parent_path === false) { $sql = 'SELECT ParentPath - FROM '.TABLE_PREFIX.'Category + FROM '.TABLE_PREFIX.'Categories WHERE CategoryId = '.$category_id; $parent_path = $this->Conn->GetOne($sql); $this->addToCache('category_parent_path', $category_id, $parent_path); @@ -1109,7 +1109,7 @@ /* @var $ml_formatter kMultiLanguage */ $sql = 'SELECT ' . $ml_formatter->LangFieldName('CachedNavbar') . ' - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE CategoryId = ' . $category_id; $category_path = $this->Conn->GetOne($sql); @@ -1168,7 +1168,7 @@ $sql = 'SELECT IF(c.CategoryId IS NULL, 0, MAX( LENGTH(c.ParentPath) - LENGTH( REPLACE(c.ParentPath, "|", "") ) - 1 )) FROM '.$this->curItem->TableName.' item_table LEFT JOIN '.TABLE_PREFIX.'CategoryItems ci ON item_table.ResourceId = ci.ItemResourceId - LEFT JOIN '.TABLE_PREFIX.'Category c ON c.CategoryId = ci.CategoryId + LEFT JOIN '.TABLE_PREFIX.'Categories c ON c.CategoryId = ci.CategoryId WHERE (ci.PrimaryCat = 1) AND '; $where_clause = '';