Exemplo n.º 1
0
 public static function IsQueue($IBLOCK_ID = false)
 {
     global $DB;
     $strWhere = $IBLOCK_ID > 0 ? 'WHERE ISPQ.IBLOCK_ID=' . intval($IBLOCK_ID) : '';
     $query = CIntranetSharepointQueue::_LimitQuery($strWhere, 1);
     $dbRes = $DB->Query($query, false, "FILE: " . __FILE__ . "<br> LINE:" . __LINE__);
     return $dbRes->Fetch() ? true : false;
 }
Exemplo n.º 2
0
 public static function IsQueue($IBLOCK_ID = false)
 {
     return CIntranetSharepointQueue::IsQueue($IBLOCK_ID);
 }
Exemplo n.º 3
0
         }
     } else {
         if ($arResult['RESULT']['COUNT'] > 0) {
             $arQueue = array();
             foreach ($arResult['RESULT']['DATA'] as $arRow) {
                 if (!CIntranetSharepoint::Sync($arResult['RESULT']['SERVICE'], $arRow, $arQueue)) {
                     if ($ex = $APPLICATION->GetException()) {
                         $arResult['ERROR'] = $ex->GetString();
                     }
                 }
             }
             $arResult['QUEUE'] = false;
             if (count($arQueue) > 0) {
                 foreach ($arQueue as $item) {
                     $item['IBLOCK_ID'] = $arResult['RESULT']['SERVICE']['IBLOCK_ID'];
                     if (CIntranetSharepointQueue::Add($item)) {
                         $arResult['QUEUE'] = true;
                     }
                 }
             }
         }
     }
 } else {
     $arResult['RESULT'] = array('MORE_ROWS' => false);
 }
 if (!$arResult['RESULT']['MORE_ROWS']) {
     if ($_REQUEST['sync_action'] == 'queue') {
         CIntranetSharepoint::AgentQueue($arParams['IBLOCK_ID']);
     } elseif ($_REQUEST['sync_action'] == 'log') {
         CIntranetSharepoint::AgentUpdate($arParams['IBLOCK_ID']);
     }