Index: branches/5.2.x/units/topics/topics_tag_processor.php =================================================================== diff -u -N -r15155 -r15286 --- branches/5.2.x/units/topics/topics_tag_processor.php (.../topics_tag_processor.php) (revision 15155) +++ branches/5.2.x/units/topics/topics_tag_processor.php (.../topics_tag_processor.php) (revision 15286) @@ -1,6 +1,6 @@ Application->ProcessParsedTag('m', 'Link', $params); } + + /** + * Detects if current user is subscribed to new topics in this category + * + * @param Array $params + * @return bool + */ + function SubscribedToCategoryTopics($params) + { + static $subscribed = null; + + if ( !isset($subscribed) ) { + $post_helper = $this->Application->recallObject('PostHelper'); + /* @var $post_helper PostHelper */ + + $subscribed = $post_helper->getSubscriptionManager('CategoryTopics')->subscribed(); + } + + return $subscribed; + } + + /** + * Detects if current user is subscribed to this topic posts + * + * @param Array $params + * @return bool + */ + function SubscribedToTopicPosts($params) + { + static $subscribed = null; + + if ( !isset($subscribed) ) { + $object = $this->getObject($params); + /* @var $object kDBItem */ + + $post_helper = $this->Application->recallObject('PostHelper'); + /* @var $post_helper PostHelper */ + + $subscribed = $post_helper->getSubscriptionManager('TopicPosts', Array ($object->GetID()))->subscribed(); + } + + return $subscribed; + } } \ No newline at end of file