当前位置: 首页>>代码示例>>PHP>>正文


PHP CPullOptions::CheckNeedRun方法代码示例

本文整理汇总了PHP中CPullOptions::CheckNeedRun方法的典型用法代码示例。如果您正苦于以下问题:PHP CPullOptions::CheckNeedRun方法的具体用法?PHP CPullOptions::CheckNeedRun怎么用?PHP CPullOptions::CheckNeedRun使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CPullOptions的用法示例。


在下文中一共展示了CPullOptions::CheckNeedRun方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: OnEpilog

 public static function OnEpilog()
 {
     if (!defined('BX_PULL_SKIP_INIT') && !(isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') && $GLOBALS['USER'] && intval($GLOBALS['USER']->GetID()) > 0 && CModule::IncludeModule('pull')) {
         define("BX_PULL_SKIP_INIT", true);
         if (CPullOptions::CheckNeedRun()) {
             CJSCore::Init(array('pull'));
             $pullConfig = CPullChannel::GetConfig($GLOBALS['USER']->GetID());
             global $APPLICATION;
             $APPLICATION->AddAdditionalJS('<script type="text/javascript">BX.bind(window, "load", function() { BX.PULL.start(' . (empty($pullConfig) ? '' : CUtil::PhpToJsObject($pullConfig)) . '); });</script>');
             /*
             if(!defined("BX_DESKTOP") && !defined("BX_MOBILE") && !defined("ADMIN_SECTION") && !IsModuleInstalled('b24network') && IsModuleInstalled('bitrix24') && (COption::GetOptionString('bitrix24', 'network', 'N') == 'Y'))
             {
             	CJSCore::Init(array('npull'));
             	$APPLICATION->AddAdditionalJS('<script type="text/javascript">BX.bind(window, "load", function() { BX.NPULL.start(); });</script>');
             }
             */
         }
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:19,代码来源:pull_options.php

示例2: intval

    die;
}
if (isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') {
    return;
}
if (!CModule::IncludeModule('pull')) {
    return;
}
if (defined('BX_PULL_SKIP_INIT')) {
    return;
}
$userId = 0;
if (defined('PULL_USER_ID')) {
    $userId = PULL_USER_ID;
} else {
    if ($GLOBALS['USER'] && intval($GLOBALS['USER']->GetID()) > 0) {
        $userId = intval($GLOBALS['USER']->GetID());
    }
}
if ($userId == 0) {
    return;
}
if (CPullOptions::CheckNeedRun()) {
    CJSCore::Init(array('pull'));
    $arResult = CPullChannel::GetConfig($userId);
    if (!(isset($arParams['TEMPLATE_HIDE']) && $arParams['TEMPLATE_HIDE'] == 'Y')) {
        define("BX_PULL_SKIP_INIT", true);
        $this->IncludeComponentTemplate();
    }
}
return $arResult;
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php

示例3: array

<?php

if ($_SERVER["REQUEST_METHOD"] == "POST" && array_key_exists("PULL_AJAX_CALL", $_REQUEST) && $_REQUEST["PULL_AJAX_CALL"] === "Y") {
    $arResult = array();
    global $USER, $APPLICATION, $DB;
    include $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/bitrix/pull.request/ajax.php";
    die;
} else {
    if (!defined('BX_SKIP_PULL_INIT') && !(isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y') && intval($GLOBALS['USER']->GetID()) > 0 && CModule::IncludeModule('pull') && CPullOptions::CheckNeedRun()) {
        define("BX_SKIP_PULL_INIT", true);
        CJSCore::Init(array('pull'));
        global $APPLICATION;
        $jsMsg = '<script type="text/javascript">BX.PULL.start(' . (defined('BX_PULL_SKIP_LS') ? "{LOCAL_STORAGE: 'N'}" : '') . ');</script>';
        if ($GLOBALS['APPLICATION']->IsJSOptimized()) {
            $APPLICATION->AddAdditionalJS($jsMsg);
        } else {
            $APPLICATION->AddHeadString($jsMsg);
        }
    }
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:20,代码来源:ajax_hit.php

示例4: array

<?
if($_SERVER["REQUEST_METHOD"] == "POST" && array_key_exists("PULL_AJAX_CALL", $_REQUEST) && $_REQUEST["PULL_AJAX_CALL"] === "Y")
{
	$arResult = array();
	global $USER, $APPLICATION, $DB;
	include($_SERVER["DOCUMENT_ROOT"]."/bitrix/components/bitrix/pull.request/ajax.php");
	die();
}
else if (!defined('BX_PULL_SKIP_INIT') && !(isset($_REQUEST['AJAX_CALL']) && $_REQUEST['AJAX_CALL'] == 'Y')
		&& intval($GLOBALS['USER']->GetID()) > 0 && CModule::IncludeModule('pull') && CPullOptions::CheckNeedRun())
{
	// define("BX_PULL_SKIP_INIT", true);
	CJSCore::Init(array('pull'));

	global $APPLICATION;

	$pullConfig = Array();

	if (defined('BX_PULL_SKIP_LS'))
		$pullConfig['LOCAL_STORAGE'] = 'N';

	$pullChannel = CPullChannel::Get($GLOBALS['USER']->GetId());
	if (is_array($pullChannel))
	{
		$pullWebSocketStatus = false;
		$pullNginxStatus = CPullOptions::GetNginxStatus();

		$pullChannels = Array($pullChannel['CHANNEL_ID']);
		if ($pullNginxStatus)
		{
			if (defined('BX_PULL_SKIP_WEBSOCKET'))
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:31,代码来源:ajax_hit.php

示例5: OnEpilog

 public static function OnEpilog()
 {
     $userId = 0;
     if (defined('PULL_USER_ID')) {
         $userId = PULL_USER_ID;
     } else {
         if ($GLOBALS['USER'] && intval($GLOBALS['USER']->GetID()) > 0) {
             $userId = intval($GLOBALS['USER']->GetID());
         }
     }
     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()) {
             CJSCore::Init(array('pull'));
             $pullConfig = CPullChannel::GetConfig($userId);
             global $APPLICATION;
             $APPLICATION->AddAdditionalJS('<script type="text/javascript">BX.bind(window, "load", function() { BX.PULL.start(' . (empty($pullConfig) ? '' : CUtil::PhpToJsObject($pullConfig)) . '); });</script>');
         }
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:20,代码来源:pull_options.php


注:本文中的CPullOptions::CheckNeedRun方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。