Index: trunk/kernel/include/item.php =================================================================== diff -u -r1200 -r1201 --- trunk/kernel/include/item.php (.../item.php) (revision 1200) +++ trunk/kernel/include/item.php (.../item.php) (revision 1201) @@ -539,7 +539,7 @@ global $objSession, $objFavorites; $res = FALSE; - if($objSession->HasCatPermission("FAVORITES",$this->GetPrimaryCategory() )) + if($objSession->HasCatPermission("FAVORITES", $this->GetPrimaryCategory() )) { if(!$PortalUserId) $PortalUserId = $objSession->Get("PortalUserId"); @@ -558,7 +558,7 @@ $res = FALSE; - if($objSession->HasCatPermission("FAVORITES")) + if($objSession->HasCatPermission("FAVORITES", $this->GetPrimaryCategory())) { if(!$PortalUserId) $PortalUserId = $objSession->Get("PortalUserId"); @@ -572,14 +572,13 @@ return $res; } - function IsFavorite($PortalUserId=NULL) + function IsFavorite($PortalUserId=NULL, $cat_id=NULL) { global $objSession, $objFavorites; $res = FALSE; - - if($objSession->HasCatPermission("FAVORITES")) + if($objSession->HasCatPermission("FAVORITES", $cat_id)) { if(!$PortalUserId) $PortalUserId = $objSession->Get("PortalUserId"); Index: trunk/kernel/include/parseditem.php =================================================================== diff -u -r1185 -r1201 --- trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1185) +++ trunk/kernel/include/parseditem.php (.../parseditem.php) (revision 1201) @@ -387,6 +387,11 @@ else $ret = $url; break; + case 'perm': + $cat_id = $this->GetPrimaryCategory(); + $element->attributes['_category'] = $cat_id; + $ret = m_perm_text($element->attributes); + break; default: $ret = "Undefined:".$element->name; break;