Index: trunk/kernel/include/category.php =================================================================== diff -u -N -r8061 -r8397 --- trunk/kernel/include/category.php (.../category.php) (revision 8061) +++ trunk/kernel/include/category.php (.../category.php) (revision 8397) @@ -11,6 +11,8 @@ var $Permissions; var $DescriptionField = ''; + var $PrimaryDescriptionField = ''; + var $PrimaryTitleField = ''; function clsCategory($CategoryId=NULL) { @@ -21,6 +23,9 @@ $this->TitleField = $ml_formatter->LangFieldName('Name'); $this->DescriptionField = $ml_formatter->LangFieldName('Description'); + $this->PrimaryTitleField = $ml_formatter->LangFieldName('Name', 1); + $this->PrimaryDescriptionField = $ml_formatter->LangFieldName('Description', 1); + $this->tablename = GetTablePrefix()."Category"; $this->type=1; $this->BasePermission ="CATEGORY"; @@ -373,7 +378,7 @@ $res = $this->Get($navbar_field); if (!strlen($res)) { $this->UpdateCachedPath(); - $res = $this->Get($navbar_field); + $res = $this->Get($navbar_field, $ml_formatter->LangFieldName('CachedNavbar',1)); } return str_replace('&|&', ' > ', $res); } @@ -815,7 +820,7 @@ function GetNavbar() { $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - return str_replace('&|&', ' > ', $this->Get($ml_formatter->LangFieldName('CachedNavbar'))); + return str_replace('&|&', ' > ', $this->Get($ml_formatter->LangFieldName('CachedNavbar'), $ml_formatter->LangFieldName('CachedNavbar', 1))); } function ParseObject($element) @@ -865,14 +870,14 @@ @field:cat.name @description:Category name */ - $ret = $this->HighlightField($this->TitleField); + $ret = $this->HighlightText($this->Get($this->TitleField, $this->PrimaryTitleField)); break; case "description": /* @field:cat.description @description:Category Description */ - $ret = ($this->Get($this->DescriptionField)); + $ret = ($this->Get($this->DescriptionField, $this->PrimaryDescriptionField)); $ret = $this->HighlightText($ret); break; case "cachednavbar": @@ -1540,14 +1545,18 @@ var $TitleField = ''; var $DescriptionField = ''; + var $PrimaryTitleField; + var $PrimaryDescriptionField; function clsCatList() { global $m_var_list; $this->clsItemCollection(); $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); $this->TitleField = $ml_formatter->LangFieldName('Name'); + $this->PrimaryTitleField = $ml_formatter->LangFieldName('Name', 1); $this->DescriptionField = $ml_formatter->LangFieldName('Description'); + $this->PrimaryDescriptionField = $ml_formatter->LangFieldName('Description', 1); $this->Prefix = 'c'; $this->classname="clsCategory"; @@ -2110,7 +2119,7 @@ foreach ($fields_hash as $field_name => $field_value) { $d->Set($field_name, $field_value); } - + $d->Create(); if (!$from_import) {