• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/subscribe.php
  • Класс: BitrixCatalogSubscribeTable
  • Вызов: SubscribeTable::getProtocol
static function getProtocol()
{
	$currentApplication = Application::getInstance();
	$context = $currentApplication->getContext();

	if ($protocol = Option::get('main', 'mail_link_protocol'))
	{
		if (mb_strrpos($protocol, '://') === false)
			$protocol .= '://';
	}
	else
	{
		if ($context->getServer()->getServerName())
		{
			$protocol = ($context->getRequest()->isHttps() ? 'https://' : 'http://');
		}
		else
		{
			$protocol = 'https://';
		}
	}

	unset($currentApplication);
	unset($context);

	return $protocol;
}