Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/classes/general/ |
Upload File : |
<?php use Bitrix\Main\SiteDomainTable; class _CLangDBResult extends CDBResult { function Fetch() { if ($res = parent::Fetch()) { static $arCache = []; if (isset($arCache[$res["LID"]])) { $res["DOMAINS"] = $arCache[$res["LID"]]; } else { $rs = SiteDomainTable::getList([ 'order' => ['DOMAIN_LENGTH' => 'ASC'], 'cache' => ['ttl' => 86400], ]); while ($ar = $rs->fetch()) { $arLangDomain[$ar["LID"]][] = $ar; } $res["DOMAINS"] = ""; if (isset($arLangDomain[$res["LID"]]) && is_array($arLangDomain[$res["LID"]])) { foreach ($arLangDomain[$res["LID"]] as $ar_res) { $domain = $ar_res["DOMAIN"]; $arErrorsTmp = []; if ($domainTmp = CBXPunycode::ToUnicode($ar_res["DOMAIN"], $arErrorsTmp)) { $domain = $domainTmp; } $res["DOMAINS"] .= $domain . "\r\n"; } } $res["DOMAINS"] = trim($res["DOMAINS"]); $arCache[$res["LID"]] = $res["DOMAINS"]; } if (empty($res["DOC_ROOT"]) || trim($res["DOC_ROOT"]) === "") { $res["ABS_DOC_ROOT"] = $_SERVER["DOCUMENT_ROOT"]; } else { $res["ABS_DOC_ROOT"] = Rel2Abs($_SERVER["DOCUMENT_ROOT"], $res["DOC_ROOT"]); } if ($res["ABS_DOC_ROOT"] !== $_SERVER["DOCUMENT_ROOT"]) { $res["SITE_URL"] = (CMain::IsHTTPS() ? "https://" : "http://") . $res["SERVER_NAME"]; } } return $res; } }