Index: branches/5.2.x/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r14952 -r15012 --- branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 14952) +++ branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 15012) @@ -1,6 +1,6 @@ Application->GetVar('continue'); - $total_cats = (int) $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Category'); + $total_cats = (int) $this->Conn->GetOne('SELECT COUNT(*) FROM '.TABLE_PREFIX.'Categories'); if ($continue === false && $total_cats > CACHE_PERM_CHUNK_SIZE) { // first step, if category count > CACHE_PERM_CHUNK_SIZE, then ask for cache update @@ -552,7 +552,7 @@ protected function SaveWarning($params) { if ( $this->Prefix == 'st' ) { - // don't use this method for other prefixes then Category, that use this tag processor + // don't use this method for other prefixes then Categories, that use this tag processor return parent::SaveWarning($params); } @@ -695,7 +695,7 @@ if ( !isset($current_path) ) { $sql = 'SELECT ParentPath - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE CategoryId = ' . (int)$this->Application->GetVar('m_cat_id'); $current_path = $this->Conn->GetOne($sql); } @@ -704,11 +704,12 @@ $test_path = $params['parent_path']; } else { - $template = $params['template']; + $template = isset($params['template']) ? $params['template'] : ''; + if ( $template ) { // when using from "c:CachedMenu" tag $sql = 'SELECT ParentPath - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE NamedParentPath = ' . $this->Conn->qstr('Content/' . $template); $test_path = $this->Conn->GetOne($sql); } @@ -789,13 +790,13 @@ list ($tree_left, $tree_right) = $this->Application->getTreeIndex($category_id); $sql = 'SELECT MAX(Modified) AS ModDate, MAX(CreatedOn) AS NewDate - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE TreeLeft BETWEEN ' . $tree_left . ' AND ' . $tree_right; } else { // scan all categories in system $sql = 'SELECT MAX(Modified) AS ModDate, MAX(CreatedOn) AS NewDate - FROM ' . TABLE_PREFIX . 'Category'; + FROM ' . TABLE_PREFIX . 'Categories'; } $this->Conn->nextQueryCachable = true; @@ -1749,7 +1750,7 @@ function HasSubCats($params) { $sql = 'SELECT COUNT(*) - FROM ' . TABLE_PREFIX . 'Category + FROM ' . TABLE_PREFIX . 'Categories WHERE ParentId = ' . $params['cat_id']; return $this->Conn->GetOne($sql);