| Current Path : /var/www/homesaver/www/bitrix/modules/forum/lib/controller/ |
| Current File : /var/www/homesaver/www/bitrix/modules/forum/lib/controller/topic.php |
<?php
namespace Bitrix\Forum\Controller;
use Bitrix\Main;
use Bitrix\Forum;
class Topic extends Main\Engine\Controller
{
public function headAction($topicId)
{
if (($topic = Forum\Topic::getById($topicId)) !== null)
{
global $USER;
$user = Forum\User::getById($USER->GetID());
if ($user->canReadTopic($topic))
{
return $topic->getData();
}
}
return null;
}
}