Index: trunk/kernel/units/general/cat_tag_processor.php =================================================================== diff -u -N -r6093 -r6428 --- trunk/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6093) +++ trunk/kernel/units/general/cat_tag_processor.php (.../cat_tag_processor.php) (revision 6428) @@ -36,21 +36,31 @@ return isset($icons[$value]) ? $icons[$value] : $icons['default']; } - function ItemLink($params) + /** + * Allows to create valid mod-rewrite compatible link to module item + * + * @param Array $params + * @param string $id_prefix + * @return string + */ + function ItemLink($params, $id_prefix) { - // 'p_id'=>'0', ?? - $params = array_merge($params, array('pass'=>'m,'.$this->Prefix)); - $item_id = getArrayValue($params,$this->Prefix.'_id'); + $params = array_merge($params, Array('pass' => 'm,'.$this->Prefix) ); + + $item_id = isset($params[$id_prefix.'_id']) && $params[$id_prefix.'_id']; if (!$item_id) { - $item_id = $this->Application->GetVar($this->Prefix.'_id'); + $item_id = $this->Application->GetVar($this->getPrefixSpecial().'_id'); + if (!$item_id) { + $item_id = $this->Application->GetVar($this->Prefix.'_id'); + } } $params[$this->Prefix.'_id'] = $item_id; - $item =& $this->Application->recallObject($this->getPrefixSpecial()); - $params['m_cat_id'] = $item->GetDBField('CategoryId'); + $object =& $this->getObject($params); + $params['m_cat_id'] = $object->GetDBField('CategoryId'); + $params['pass_category'] = 1; - $main_processor =& $this->Application->recallObject('m_TagProcessor'); - return $main_processor->T($params); + return $this->Application->ProcessParsedTag('m', 't', $params); } /**