Exemplo n.º 1
0
     } 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']);
         }
     }
     if ($arResult['ERROR']) {
         $this->IncludeComponentTemplate('sync_error');
     } else {
         if (!$arResult['RESULT']['MORE_ROWS']) {
             if (!($arResult['QUEUE_EXISTS'] = CIntranetSharepoint::IsQueue($arParams['IBLOCK_ID']))) {
                 $arResult['LOG_EXISTS'] = CIntranetSharepoint::IsLog($arParams['IBLOCK_ID']);
             }
         }
         $this->IncludeComponentTemplate('sync');
     }
     break;
 case 'test':
     if (!check_bitrix_sessid()) {
         return;
     }
     $sp_server = $_REQUEST['sp_server'];
     $sp_user = $_REQUEST['sp_user'];
     $sp_pass = $_REQUEST['sp_pass'];
     $arResult['SERVER'] = 0;
     $arResult['AUTH'] = 0;
     if ($sp_server && $sp_server != 'http://' && ($URL = CHTTP::ParseURL($sp_server))) {