• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/classes/general/pull_options.php
  • Класс: CPullOptions
  • Вызов: CPullOptions::OnEpilog
static function OnEpilog()
{
	$userId = 0;
	if (defined('PULL_USER_ID'))
	{
		$userId = PULL_USER_ID;
	}
	else if (is_object($GLOBALS['USER']) && intval($GLOBALS['USER']->GetID()) > 0)
	{
		$userId = intval($GLOBALS['USER']->GetID());
	}
	else if (IsModuleInstalled('statistic') && intval($_SESSION["SESS_SEARCHER_ID"]) <= 0 && intval($_SESSION["SESS_GUEST_ID"]) > 0 && COption::GetOptionString("pull", "guest", self::GetDefaultOption("guest")) == 'Y')
	{
		$userId = intval($_SESSION["SESS_GUEST_ID"])*-1;
	}

	if (!defined('BX_PULL_SKIP_INIT') && !(isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') && $userId != 0 && CModule::IncludeModule('pull'))
	{
		define("BX_PULL_SKIP_INIT", true);

		if (CPullOptions::CheckNeedRun())
		{
			Asset::getInstance()->addString('');
		}
	}
}