uawdijnntqw1x1x1
IP : 3.129.253.54
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
ekb.axolotls.ru
/
bitrix
/
components
/
bitrix
/
im.call
/
class.php
/
/
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); use Bitrix\Im\Call\Call; use Bitrix\Main\Localization\Loc; use Bitrix\Main\Loader; Loc::loadMessages(__FILE__); class CImCallComponent extends \CBitrixComponent { const MODULE='im'; protected $call; /** @var \Bitrix\Main\Error[] */ protected $errors = []; protected $userId; protected $action; public function init() { $this->action = $_REQUEST['action'] === 'startCall' ? 'startCall' : 'answer'; $this->userId = \Bitrix\Im\User::getInstance()->getId();; if ($this->action === 'startCall') { $this->call = \Bitrix\Im\Call\Call::createWithEntity( Call::TYPE_INSTANT, Call::PROVIDER_PLAIN, \Bitrix\Im\Call\Integration\EntityType::CHAT, $_REQUEST['dialogId'], $this->userId ); } else { $this->call = Call::loadWithId($_REQUEST['callId']); } if(!$this->call) { $this->errors[] = new \Bitrix\Main\Error('Conference is not found'); return false; } if(!$this->call->checkAccess($this->userId)) { $this->errors[] = new \Bitrix\Main\Error('You have no access to the conference'); return false; } return true; } protected function getPublicIds(array $userIds) { if(!Loader::includeModule('pull')) { return []; } return \Bitrix\Pull\Channel::getPublicIds([ 'USERS' => $userIds, 'JSON' => true ]); } public function prepareData() { $this->arResult['CALL'] = $this->call->toArray(); $this->arResult['ACTION'] = $this->action; $this->arResult['CALL_USERS'] = $this->call->getUsers(); $this->arResult['PUBLIC_IDS'] = $this->getPublicIds($this->arResult['CALL_USERS']); } public function executeComponent() { if (!Loader::includeModule(self::MODULE)) { return false; } if(!$this->init()) { foreach ($this->errors as $error) { ShowError($error->getMessage()); } return false; } $this->prepareData(); $this->includeComponentTemplate(); return $this->arResult; } }
/var/www/axolotl/data/www/ekb.axolotls.ru/bitrix/components/bitrix/im.call/class.php