Exemplo n.º 1
0
 public static function AgentUpdate($_IBLOCK_ID = false)
 {
     if (CBXFeatures::IsFeatureEnabled('intranet_sharepoint')) {
         global $DB;
         $arCurrentRows = array();
         $IBLOCK_ID = 0;
         $COUNTER = 0;
         $q = 0;
         while ($arRes = CIntranetSharepointLog::Next($_IBLOCK_ID)) {
             if ($IBLOCK_ID > 0 && $IBLOCK_ID != $arRes['IBLOCK_ID']) {
                 if (self::UpdateNext($arCurrentRows)) {
                     echo 1;
                     if (++$COUNTER > BX_INTRANET_SP_LOG_COUNT) {
                         break;
                     }
                 }
                 echo 2;
                 $arCurrentRows = array();
             }
             $arCurrentRows[$arRes['ID']] = $arRes;
             $IBLOCK_ID = $arRes['IBLOCK_ID'];
         }
         if (count($arCurrentRows) > 0 && self::UpdateNext($arCurrentRows)) {
             $COUNTER++;
         }
         self::Log("Update", $COUNTER);
         return 'CIntranetSharepoint::AgentUpdate();';
     }
 }