...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/webform/script.php
- Класс: Bitrix\Crm\WebForm\Script
- Вызов: Script::getDomain
static function getDomain() { $result = null; $previous = $result = Option::get("crm", "portal_protocol_url", ''); $isHttps = Context::getCurrent()->getRequest()->isHttps(); $httpHost = Context::getCurrent()->getServer()->getHttpHost(); if ($httpHost) { $result = ($isHttps ? 'https' : 'http') . '://' . $httpHost; if ($result !== $previous) { Option::set("crm", "portal_protocol_url", $result); } } if (!$result) { $result = $previous; } if (!$result && Loader::includeModule('intranet')) { $httpHost = \CIntranetUtils::getHostName(); $result = ($isHttps ? 'https' : 'http') . '://' . $httpHost; } $uri = new Uri($result); $result = $uri->getLocator(); if (mb_substr($result, -1) == '/') { $result = mb_substr($result, 0, -1); } return $result; }