• Модуль: mobile
  • Путь к файлу: ~/bitrix/modules/mobile/classes/general/mobile_event.php
  • Класс: MobileApplication
  • Вызов: MobileApplication::__construct
public function __construct()
{
	$diskEnabled = BitrixMainConfigOption::get('disk', 'successfully_converted', false)
		&& CModule::includeModule('disk');

	if (!$diskEnabled)
	{
		$this->validUrls = array_merge(
			$this->validUrls,
			[
				"/company/personal.php",
				"/docs/index.php",
				"/docs/shared/index.php",
				"/workgroups/index.php",
			]);
	}

	if (ModuleManager::isModuleInstalled('extranet'))
	{
		$extranetSiteId = BitrixMainConfigOption::get('extranet', 'extranet_site', false);
		if ($extranetSiteId)
		{
			$res = BitrixMainSiteTable::getList([
				'filter' => ['=LID' => $extranetSiteId],
				'select' => ['DIR'],
			]);
			if ($site = $res->fetch())
			{
				$this->validUrls = array_merge(
					$this->validUrls,
					[
						$site['DIR'] . "mobile/",
						$site['DIR'] . "contacts/personal.php",
					]);
			}
		}
	}

	// We should add cloud bucket prefixes
	// to allow URLs that cloud services redirected to
	if (Loader::includeModule('clouds'))
	{
		$buckets = CCloudStorageBucket::getAllBuckets();
		foreach ($buckets as $bucket)
		{
			if ($bucket["PREFIX"])
			{
				$this->validUrls[] = "/" . $bucket["PREFIX"] . "/";
			}
		}
	}

	/*
	 * @todo need only one endpoint for files in a crm entities
	 * It's temporary fix of ticket #136389
	 */
	if (ModuleManager::isModuleInstalled('crm'))
	{
		$this->validUrls = array_merge(
			$this->validUrls,
			[
				'/bitrix/components/bitrix/crm.company.show/show_file.php',
				'/bitrix/components/bitrix/crm.contact.show/show_file.php',
				'/bitrix/components/bitrix/crm.deal.show/show_file.php',
				'/bitrix/components/bitrix/crm.lead.show/show_file.php',
				'/bitrix/components/bitrix/crm.invoice.show/show_file.php',
				'/bitrix/components/bitrix/crm.quote.show/show_file.php',
			]);
	}
}