42 $domainId = (int)$site[
'DOMAIN_ID'];
50 if (str_ends_with($domainName, self::DOMAIN_SITE_ONLINE))
52 $res = DomainTable::getList([
54 'ID',
'DOMAIN',
'PREV_DOMAIN',
60 if (($row = $res->fetch()) && isset($row[
'DOMAIN']))
62 $domainSite = $row[
'DOMAIN'];
63 $prevDomainSite = $row[
'PREV_DOMAIN'];
65 if ($domainSite !==
'' && $prevDomainSite !==
'' && str_ends_with($prevDomainSite, self::DOMAIN_SITE_BY))
67 $subDomainSite = str_replace(self::DOMAIN_SITE_ONLINE,
'', $domainSite);
68 $prevSubDomainSite = str_replace(self::DOMAIN_SITE_BY,
'', $prevDomainSite);
69 if ($subDomainSite === $prevSubDomainSite)
71 $siteController::updateDomain(
83 if (str_ends_with($domainName, self::DOMAIN_SHOP_ONLINE))
85 $res = DomainTable::getList([
87 'ID',
'DOMAIN',
'PREV_DOMAIN',
93 if (($row = $res->fetch()) && isset($row[
'DOMAIN']))
95 $domainShop = $row[
'DOMAIN'];
96 $prevDomainShop = $row[
'PREV_DOMAIN'];
98 if ($domainShop !==
'' && $prevDomainShop !==
'' && str_ends_with($prevDomainShop, self::DOMAIN_SHOP_BY))
100 $subDomainShop = str_replace(self::DOMAIN_SHOP_ONLINE,
'', $domainShop);
101 $prevSubDomainShop = str_replace(self::DOMAIN_SHOP_BY,
'', $prevDomainShop);
102 if ($subDomainShop === $prevSubDomainShop)
104 $siteController::updateDomain(