Index: branches/unlabeled/unlabeled-1.65.2/core/units/general/cat_event_handler.php =================================================================== diff -u -r6141 -r6220 --- branches/unlabeled/unlabeled-1.65.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 6141) +++ branches/unlabeled/unlabeled-1.65.2/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 6220) @@ -1887,7 +1887,33 @@ } } } + + /** + * 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) + { + $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->getPrefixSpecial().'_id'); + if (!$item_id) { + $item_id = $this->Application->GetVar($this->Prefix.'_id'); + } + } + $params[$this->Prefix.'_id'] = $item_id; + + $object =& $this->getObject($params); + $params['m_cat_id'] = $object->GetDBField('CategoryId'); + + return $this->Application->ProcessParsedTag('m', 't', $params); + } + } ?> \ No newline at end of file