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/ilovecveti.ru/bitrix/components/realcommenter_2.0/tape.show.tree/ |
Upload File : |
<?php /** * ����� "��������� ����������� D7" ��� ������� * �������� ���� �����: www.realcommenter.com * �������� ���� �����������: burlaka.studio * ����� � ����������: ������� ������� (AlexeyGfi) -> alexeygfi@gmail.com */ use Bitrix\Main\EventManager; use Bitrix\Main\Localization\Loc; use Burlakastudio\Realcommenter\Comments; use Burlakastudio\Realcommenter\DEBUGGER; use Burlakastudio\Realcommenter\GRANT_AND_ACCESS; use Burlakastudio\Realcommenter\MicrodataReview; use Burlakastudio\Realcommenter\PAGINATION; use Burlakastudio\Realcommenter\SCHEMA_ORG; use Burlakastudio\Realcommenter\TALK_GROUPS; use Burlakastudio\Realcommenter\TOOLS; use Burlakastudio\Realcommenter\URL; /** * @var CBitrixComponent $this * @var array $arParams */ if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) { die(); } $arResult['IBLOCK_PAUSED'] = TALK_GROUPS::is_paused($arParams['TALK_GROUP_ID']); if ($arParams['GFI_AJAX_MODE']) { if ($arParams['NODE_ID']) { /** * ��� ����� ����� ���, �������� �������� * �����, ���� �� ������� �� ������ �� ���������� �� ������ ���������� */ $arParams['COLLAPSE_BRANCH'] = 0; $arParams['LIMIT_START'] = 0; $arParams['LIMIT_EVERY_NEXT'] = 0; $arParams['USE_PAGE_NAV'] = false; } else if ($arParams['IPAGE']) { /** * ��� ����� ����� ���, ��������� ���������� */ } else { $arParams['GFI_AJAX_MODE'] = false; } } else { if ($arParams['NODE_ID']) { //NODE_ID ������ ������� ����� ����� ����� ���-����� $arParams['NODE_ID'] = 0; } $request = \Bitrix\Main\Context::getCurrent()->getRequest(); $arParams['ISORT'] = $request->get('isort') ?: ''; } $arResult['admin'] = GRANT_AND_ACCESS::is_admin() || GRANT_AND_ACCESS::is_local_admin($arParams); $arResult['brand_manager'] = GRANT_AND_ACCESS::isTheConversationBrandManager($arParams); if (!empty($arParams['URL'])) { $url = $arParams['URL']; } else if (!empty($arParams['STATIC_URL'])) { $url = $arParams['STATIC_URL']; } else { $arParams['MORE_BAD_KEYS'] = !empty($arParams['MORE_BAD_KEYS']) ? array_filter($arParams['MORE_BAD_KEYS']) : []; $url = TOOLS::normalize_url($arParams['MORE_BAD_KEYS']); } if (empty($url)) { DEBUGGER::error( Loc::getMessage('REALCOMMENTER_URL_DETECTION_FAILED') ); return; } $arParams['URL'] = $url; $arResult['ADMIN_KEYS'] = ($arResult['admin']) ? TOOLS::preserve_admin_get_keys() : []; /** * � ���� ���� �������� ��������� ��������� ����� ���� ����������, * ���� ����� ���� ������� � ���������� */ //$url_info = URL::get_info(0, $arParams['URL'], $arParams['TALK_GROUP_ID']); $urlInfo = URL::getInfo([ 'url' => $arParams['URL'], 'groupId' => $arParams['TALK_GROUP_ID'] ]); $insideTree = []; if ( !empty($urlInfo) && GRANT_AND_ACCESS::have_access_to_url($urlInfo, $arParams) // && !$arParams[ 'DELAY_START' ] ) { //���� �� �����, ������ ����������� $insideTree = Comments::getInsideRecursively( $urlInfo['ID'], $arParams, // ���� �� �������� �������� ��-����� ��� $arResult['admin'] || $arResult['brand_manager'] ); /** * NODE_ID ������������ �����, ���� ��� ����� ����� ��� * (�� ��� ����������� ���� ������ ���������� � ������������ ����). * * ���� ��������, ��� ����� �������� ������ � ����� ���� ��� ����, ���� ���-�� ���� �� ��� */ if ($arParams['NODE_ID'] && empty($insideTree)) { DEBUGGER::error( Loc::getMessage('NODE_ID_REQUEST_ERROR') ); die(); } if ($arParams['NODE_ID'] && $arParams['GFI_AJAX_MODE']) { return Comments::publicTreeRecursively($insideTree, $arParams); } $arResult['CONTAINER_INFO'] = $urlInfo; $arResult['COMMENTS_TREE'] = $insideTree; } /** * ����� � ������ ����� ���� ��� � �� ����� (���������� ������) * ...��� ���� � ����, ��� ���, �� �������� ������ */ if ( empty($urlInfo) || GRANT_AND_ACCESS::have_access_to_url($urlInfo, $arParams) ) { $arParams['my_script_on_server'] = TOOLS::get_path_to_script_with_component_parameters(); // ����������� ���, ������ ��� ��� �� ����� �� ����� ������������ TOOLS::processCanonical($arParams['URL']); /** * @var RealcommenterComponent $this */ $this->getComponentOutsideVariables(); if (!empty($arParams['ITAPE_OUTSIDE_VARIABLES'])) { $arParams['ITAPE_OUTSIDE_VARIABLES']['HASH'] = TOOLS::get_variables_hash( $arParams['ITAPE_OUTSIDE_VARIABLES'] ); } // if (SCHEMA_ORG::in_use($arParams)) { if (MicrodataReview::inUse($arParams)) { /** * ������ ����� tape_* �������� �� html-���� ������ */ $eventManager = EventManager::getInstance(); $eventManager->addEventHandler( 'main', 'OnEndBufferContent', // ! �� �� onEpilog ! [MicrodataReview::class, 'publish'] ); MicrodataReview::arParams($arParams); echo '<!--##REALCOMMENTER_MICRODATA_REVIEW##-->'; } $this->IncludeComponentTemplate(); }