23 $result =
new Main\Entity\EventResult;
25 if (class_exists(
'\LandingPubComponent'))
28 if (
$code === \LandingPubComponent::ERROR_STATUS_NOT_FOUND)
30 $landingInstance = \LandingPubComponent::getMainInstance();
33 $res = Landing\Site::getList([
35 'DOMAIN_NAME' =>
'DOMAIN.DOMAIN'
38 'CHECK_PERMISSIONS' =>
'N',
39 'ID' => $landingInstance[
'SITE_ID']
42 if ($row =
$res->fetch())
46 $realFilePath =
$context->getServer()->get(
'REAL_FILE_PATH');
49 $realFilePath =
$_SERVER[
'REAL_FILE_PATH'] ??
null;
53 $realFilePath =
$context->getServer()->get(
'SCRIPT_NAME');
56 $requestURL =
$context->getRequest()->getRequestedPage();
58 $landingUrl = Landing\Site::getPublicUrl($landingInstance[
'SITE_ID']);
59 $realFilePath = str_replace(
'/index.php',
'/', $realFilePath);
60 if (mb_strpos($landingUrl, $realFilePath) ===
false)
62 $requestURL = str_replace($realFilePath.$landingInstance[
'SITE_ID'],
'', $requestURL);
67 if (!$domainVerification)
73 if ($domainVerification)
76 'code' => \LandingPubComponent::ERROR_STATUS_OK
79 self::setEndBufferContentHandler($domainVerification[
'CONTENT']);