/** * Проверяет может ли пользователь голосовать за конкретный комментарий * * @param ModuleUser_EntityUser $oUser Пользователь * @param ModuleComment_EntityComment $oComment Комментарий * @return bool */ public function CanVoteComment(ModuleUser_EntityUser $oUser, ModuleComment_EntityComment $oComment) { //if ($oUser->getRating()<Config::Get('acl.vote.comment.rating')) { // return false; //} if ($oComment->getTargetType() == 'talk') { return false; } if (!in_array($oComment->getTarget()->getBlogId(), $this->ModuleBlog_GetAccessibleBlogsByUser($oUser)) and $oComment->getTarget()->getBlog()->getType() != "open") { return false; } return true; }