public static function SPRegisterUpdatedItem($arFields) { if (CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) { if (CIntranetSharepoint::$bUpdateInProgress) { return; } $dbRes = CIntranetSharepoint::GetByID($arFields['IBLOCK_ID']); if ($arRes = $dbRes->Fetch()) { CIntranetSharepoint::AddToUpdateLog($arFields); } } }
protected static function CheckFields($action, &$arFields) { global $APPLICATION; if ($arFields['IBLOCK_ID'] = intval($arFields['IBLOCK_ID'])) { $dbRes = CIntranetSharepoint::GetByID($arFields['IBLOCK_ID']); if (!($arRes = $dbRes->Fetch())) { $APPLICATION->ThrowException(GetMessage('ISPQ_ERROR_SERVICE_NOT_REGISTERED', array('ID' => $arFields['IBLOCK_ID']))); return false; } } if (strlen($arFields['SP_METHOD']) <= 0) { $APPLICATION->ThrowException(GetMessage('ISPQ_ERROR_NO_METHOD')); return false; } $arFields['SP_METHOD'] = trim($arFields['SP_METHOD']); return true; }
protected static function _ListNext($limit) { global $DB; if (null == self::$lists_queue) { self::$lists_queue = array(); $query = CIntranetSharepoint::_ListNextQuery($limit); $dbRes = $DB->Query($query); while ($arList = $dbRes->Fetch()) { array_push(self::$lists_queue, $arList['IBLOCK_ID']); } } return array_shift(self::$lists_queue); }
?> "><?php echo htmlspecialcharsex($field['DisplayName']) . ' (' . htmlspecialcharsex($field['Name']) . ')'; ?> </option> <?php } ?> </select></td> <td valign="top" class="bx-width50"> <span id="bx_field_select"><?php echo CIntranetSharepoint::GetTypesHTML($arParams['IBLOCK_ID'], 'bx_field'); ?> </span> <span id="bx_field_select_create" style="display: none;"><?php echo CIntranetSharepoint::GetTypesCreateHTML('bx_field_create'); ?> </span> <input type="checkbox" id="bx_field_create_new" onclick="SLswitchSelectors(this.checked)" /> <label for="bx_field_create_new"><?php echo GetMessage('SL_FORM_LIST_FIELD_CREATE'); ?> </label> </td> </tr> </tbody><tfoot> <tr> <td colspan="2"><button onclick="SLadd(); return false;"><?php echo GetMessage('SL_FORM_LIST_ADD'); ?> </button></td> </tr>
} 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))) {