Index: branches/5.2.x/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r14628 -r14653 --- branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 14628) +++ branches/5.2.x/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 14653) @@ -1,6 +1,6 @@ Application->recallObject($this->getPrefixSpecial(), $this->Prefix.'_List'); /* @var $cat_object kDBList */ - + $sql = 'SELECT '.$this->getTitleField().' FROM '.$cat_object->TableName.' WHERE CategoryId = '.(int)$this->Application->GetVar('m_cat_id'); @@ -216,7 +216,7 @@ { $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); /* @var $ml_formatter kMultiLanguage */ - + return $ml_formatter->LangFieldName('Name'); } @@ -257,28 +257,28 @@ { $category_id = getArrayValue($params, 'cat_id'); - if ($category_id === false) { + if ( $category_id === false ) { $category_id = $this->Application->GetVar($this->getPrefixSpecial() . '_id'); } - if ("$category_id" == 'Root') { + if ( "$category_id" == 'Root' ) { $category_id = $this->Application->findModule('Name', $params['module'], 'RootCat'); } - elseif ("$category_id" == 'current') { + elseif ( "$category_id" == 'current' ) { $category_id = $this->Application->GetVar('m_cat_id'); } - if (!array_key_exists('direct_link', $params) || !$params['direct_link']) { - $category_id = $this->getCategorySymLink( (int)$category_id ); + if ( !array_key_exists('direct_link', $params) || !$params['direct_link'] ) { + $category_id = $this->getCategorySymLink((int)$category_id); } else { unset($params['direct_link']); } - $physical_template = $this->Application->getPhysicalTemplate('id:' . $category_id); + $virtual_template = $this->Application->getVirtualPageTemplate($category_id); - if ( ($physical_template !== false) && preg_match('/external:(.*)/', $physical_template, $rets) ) { - // external url + if ( ($virtual_template !== false) && preg_match('/external:(.*)/', $virtual_template, $rets) ) { + // external url (return here, instead of always replacing $params['t'] for kApplication::HREF to find it) return $rets[1]; } @@ -607,7 +607,7 @@ { $object =& $this->getObject($params); /* @var $object CategoriesItem */ - + return $object->IsRoot(); }