Created
July 5, 2021 08:02
-
-
Save sukhikh18/faf976ddc1adfdd248137f1c04e26e60 to your computer and use it in GitHub Desktop.
Добавить свойство в событие (письмо) #Bitrix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Bitrix\Main\EventManager; | |
$obEeventManager = EventManager::getInstance(); | |
$obEeventManager->addEventHandler("main", "OnBeforeEventSend", static function(&$arFields, &$arTemplate) { | |
$arFields['HTTP_REFERER_RAW'] = htmlspecialcharsEx($_SERVER["HTTP_REFERER"]); | |
$arFields['HTTP_REFERER'] = $arFields['HTTP_REFERER_RAW'] ? 'Отправленно со страницы: ' . $arFields['HTTP_REFERER_RAW'] : ''; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment