• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/classes/general/log_tools.php
  • Класс: CSocNetLogTools
  • Вызов: CSocNetLogTools::FindLogCommentEventByLogEventID
static function FindLogCommentEventByLogEventID($log_event_id)
{
	$arEvent = false;
	$arSocNetLogEvents = CSocNetAllowed::GetAllowedLogEvents();

	if (
		array_key_exists($log_event_id, $arSocNetLogEvents)
		&& array_key_exists("COMMENT_EVENT", $arSocNetLogEvents[$log_event_id])
	)
	{
		$arEvent = $arSocNetLogEvents[$log_event_id]["COMMENT_EVENT"];
	}
	else
	{
		$arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
		foreach ($arSocNetFeaturesSettings as $feature_id_tmp => $arFeatureTmp)
		{
			if (
				array_key_exists("subscribe_events", $arFeatureTmp)
				&& array_key_exists($log_event_id, $arFeatureTmp["subscribe_events"])
				&& array_key_exists("COMMENT_EVENT", $arFeatureTmp["subscribe_events"][$log_event_id])
			)
			{
				$arEvent = $arFeatureTmp["subscribe_events"][$log_event_id]["COMMENT_EVENT"];
				break;
			}
		}
	}

	return $arEvent;
}