public static function Update($ID, $arFields) { global $DB; $ID = IntVal($ID); $arFields1 = array(); foreach ($arFields as $key => $value) { if (substr($key, 0, 1) == "=") { $arFields1[substr($key, 1)] = $value; unset($arFields[$key]); } } if (!CSaleExport::CheckFields("UPDATE", $arFields, $ID)) { return false; } $strUpdate = $DB->PrepareUpdate("b_sale_export", $arFields); foreach ($arFields1 as $key => $value) { if (strlen($strUpdate) > 0) { $strUpdate .= ", "; } $strUpdate .= $key . "=" . $value . " "; } if (strlen($strUpdate) > 0) { $strSql = "UPDATE b_sale_export SET " . "\t" . $strUpdate . " " . "WHERE ID = " . $ID . " "; $DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__); unset($GLOBALS["SALE_EXPORT"]["SALE_EXPORT_CACHE_" . $ID]); return $ID; } return False; }
function Update($ID, $arFields) { $ID = IntVal($ID); if (!CSaleExport::CheckFields('UPDATE', $arFields, $ID)) { return false; } foreach ($arFields as $key => $value) { if (substr($key, 0, 1) == "=") { $arFields[substr($key, 1)] = $value; unset($arFields[$key]); } } if (($map1C = unserialize($arFields['VARS'])) && is_array($map1C)) { self::setMap($arFields['PERSON_TYPE_ID'], $map1C, 'Update:' . $arFields['PERSON_TYPE_ID'] . ':' . $ID); } return $arFields['PERSON_TYPE_ID']; }