Index: branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php =================================================================== diff -u -r5651 -r5709 --- branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5651) +++ branches/unlabeled/unlabeled-1.28.2/kernel/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5709) @@ -153,15 +153,15 @@ // which block to parse as current ? if ($category_id == 0) { - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as,block'); } if ($block_params['is_module_root'] == 1) { // module root - $block_params['name'] = $this->SelectParam($params, 'module_root_render_as,block_module_root,rootmoduleblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'module_root_render_as,block_module_root,rootmoduleblock,render_as,block'); } if ($block_params['current'] == 1) { // current cat (label) - $block_params['name'] = $this->SelectParam($params, 'current_render_as,block_current,currentblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'current_render_as,block_current,currentblock,render_as,block'); } $this->Application->SetVar($this->Prefix.'_id', $category_id); Index: branches/unlabeled/unlabeled-1.13.2/kernel/units/configuration/configuration_tag_processor.php =================================================================== diff -u -r5651 -r5709 --- branches/unlabeled/unlabeled-1.13.2/kernel/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 5651) +++ branches/unlabeled/unlabeled-1.13.2/kernel/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 5709) @@ -148,53 +148,11 @@ */ function CategoryPath($params) { - $block_params['separator'] = $params['separator']; - if (!isset($params['cat_id'])) { $params['cat_id'] = $this->ModuleRootCategory( Array() ); } - if ($params['cat_id'] == 0) { - $block_params['cat_id'] = 0; - $block_params['cat_name'] = $this->Application->ProcessParsedTag('m', 'RootCategoryName', $params); - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); - return $this->Application->ParseBlock($block_params); - } - else { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $navbar_field = $ml_formatter->LangFieldName('CachedNavBar'); - - $id_field = $this->Application->getUnitOption('c', 'IDField'); - $table_name = $this->Application->getUnitOption('c', 'TableName'); - $sql = 'SELECT '.$navbar_field.', ParentPath - FROM '.$table_name.' - WHERE '.$id_field.' = '.$params['cat_id']; - $category_data = $this->Conn->GetRow($sql); - $ret = ''; - if ($category_data) { - $category_names = explode('&|&', $category_data[$navbar_field]); - $category_ids = explode('|', substr($category_data['ParentPath'], 1, -1)); - - // add "Home" category at beginning of path - array_unshift($category_names, $this->Application->ProcessParsedTag('m', 'RootCategoryName', $params)); - array_unshift($category_ids, 0); - - foreach ($category_ids as $category_pos => $category_id) { - $block_params['cat_id'] = $category_id; - $block_params['cat_name'] = $category_names[$category_pos]; - $block_params['name'] = $this->SelectParam($params, 'render_as,block'); - - if ($category_id == 0) { - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); - } - - $this->Application->SetVar($this->Prefix.'_id', $category_id); - $ret .= $this->Application->ParseBlock($block_params, 1); - } - } - - return $ret; - } + return $this->Application->ProcessParsedTag('c', 'CategoryPath', $params); } /** Index: branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php =================================================================== diff -u -r5651 -r5709 --- branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5651) +++ branches/unlabeled/unlabeled-1.28.2/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 5709) @@ -153,15 +153,15 @@ // which block to parse as current ? if ($category_id == 0) { - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as,block'); } if ($block_params['is_module_root'] == 1) { // module root - $block_params['name'] = $this->SelectParam($params, 'module_root_render_as,block_module_root,rootmoduleblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'module_root_render_as,block_module_root,rootmoduleblock,render_as,block'); } if ($block_params['current'] == 1) { // current cat (label) - $block_params['name'] = $this->SelectParam($params, 'current_render_as,block_current,currentblock,render_as'); + $block_params['name'] = $this->SelectParam($params, 'current_render_as,block_current,currentblock,render_as,block'); } $this->Application->SetVar($this->Prefix.'_id', $category_id); Index: branches/unlabeled/unlabeled-1.13.2/core/units/configuration/configuration_tag_processor.php =================================================================== diff -u -r5651 -r5709 --- branches/unlabeled/unlabeled-1.13.2/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 5651) +++ branches/unlabeled/unlabeled-1.13.2/core/units/configuration/configuration_tag_processor.php (.../configuration_tag_processor.php) (revision 5709) @@ -148,53 +148,11 @@ */ function CategoryPath($params) { - $block_params['separator'] = $params['separator']; - if (!isset($params['cat_id'])) { $params['cat_id'] = $this->ModuleRootCategory( Array() ); } - if ($params['cat_id'] == 0) { - $block_params['cat_id'] = 0; - $block_params['cat_name'] = $this->Application->ProcessParsedTag('m', 'RootCategoryName', $params); - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); - return $this->Application->ParseBlock($block_params); - } - else { - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $navbar_field = $ml_formatter->LangFieldName('CachedNavBar'); - - $id_field = $this->Application->getUnitOption('c', 'IDField'); - $table_name = $this->Application->getUnitOption('c', 'TableName'); - $sql = 'SELECT '.$navbar_field.', ParentPath - FROM '.$table_name.' - WHERE '.$id_field.' = '.$params['cat_id']; - $category_data = $this->Conn->GetRow($sql); - $ret = ''; - if ($category_data) { - $category_names = explode('&|&', $category_data[$navbar_field]); - $category_ids = explode('|', substr($category_data['ParentPath'], 1, -1)); - - // add "Home" category at beginning of path - array_unshift($category_names, $this->Application->ProcessParsedTag('m', 'RootCategoryName', $params)); - array_unshift($category_ids, 0); - - foreach ($category_ids as $category_pos => $category_id) { - $block_params['cat_id'] = $category_id; - $block_params['cat_name'] = $category_names[$category_pos]; - $block_params['name'] = $this->SelectParam($params, 'render_as,block'); - - if ($category_id == 0) { - $block_params['name'] = $this->SelectParam($params, 'root_cat_render_as,block_root_cat,rootcatblock,render_as'); - } - - $this->Application->SetVar($this->Prefix.'_id', $category_id); - $ret .= $this->Application->ParseBlock($block_params, 1); - } - } - - return $ret; - } + return $this->Application->ProcessParsedTag('c', 'CategoryPath', $params); } /** Index: branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php =================================================================== diff -u -r5609 -r5709 --- branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5609) +++ branches/unlabeled/unlabeled-1.11.2/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5709) @@ -48,34 +48,8 @@ if (!isset($params['cat_id'])) { $params['cat_id'] = $this->Application->RecallVar($params['session_var'], 0); } - - $block_params['separator'] = $params['separator']; - if ($params['cat_id'] == 0) { - $block_params['name'] = $params['rootcatblock']; - return $this->Application->ParseBlock($block_params); - } - else { - $cat_object =& $this->Application->recallObject('c', 'c_List'); - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = 'SELECT CategoryId, ParentId, '.$ml_formatter->LangFieldName('Name').' AS Name - FROM '.$cat_object->TableName.' - WHERE CategoryId = '.$params['cat_id']; - $res = $this->Conn->GetRow($sql); - if ($res === false) { - // in case if category is deleted - return ''; - } - $block_params['name'] = $params['block']; - $block_params['cat_name'] = $res['Name']; - $block_params['cat_id'] = $res['CategoryId']; - - $next_params['separator'] = $params['separator']; - $next_params['rootcatblock'] = $params['rootcatblock']; - $next_params['block'] = $params['block']; - $next_params['cat_id'] = $res['ParentId']; - return $this->CategoryPath($next_params).$this->Application->ParseBlock($block_params); - } + return $this->Application->ProcessParsedTag('c', 'CategoryPath', $params); } function BuildListSpecial($params) Index: branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php =================================================================== diff -u -r5609 -r5709 --- branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5609) +++ branches/unlabeled/unlabeled-1.11.2/core/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 5709) @@ -48,34 +48,8 @@ if (!isset($params['cat_id'])) { $params['cat_id'] = $this->Application->RecallVar($params['session_var'], 0); } - - $block_params['separator'] = $params['separator']; - if ($params['cat_id'] == 0) { - $block_params['name'] = $params['rootcatblock']; - return $this->Application->ParseBlock($block_params); - } - else { - $cat_object =& $this->Application->recallObject('c', 'c_List'); - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - $sql = 'SELECT CategoryId, ParentId, '.$ml_formatter->LangFieldName('Name').' AS Name - FROM '.$cat_object->TableName.' - WHERE CategoryId = '.$params['cat_id']; - $res = $this->Conn->GetRow($sql); - if ($res === false) { - // in case if category is deleted - return ''; - } - $block_params['name'] = $params['block']; - $block_params['cat_name'] = $res['Name']; - $block_params['cat_id'] = $res['CategoryId']; - - $next_params['separator'] = $params['separator']; - $next_params['rootcatblock'] = $params['rootcatblock']; - $next_params['block'] = $params['block']; - $next_params['cat_id'] = $res['ParentId']; - return $this->CategoryPath($next_params).$this->Application->ParseBlock($block_params); - } + return $this->Application->ProcessParsedTag('c', 'CategoryPath', $params); } function BuildListSpecial($params)