• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/connection.php
  • Класс: CAllDavConnection
  • Вызов: CAllDavConnection::Update
static function Update($id, $arFields, $bModifyDate = true)
{
	global $DB, $APPLICATION;

	$id = (int)$id;
	if (!$id)
	{
		throw new CDavArgumentNullException("id");
	}

	$r = self::ParseFields($arFields, $id);
	if ($r !== true)
	{
		foreach ($r as $v)
		{
			$APPLICATION->ThrowException($v[0], $v[1]);
		}

		return false;
	}

	$strUpdate = $DB->PrepareUpdate("b_dav_connections", $arFields);
	if ($strUpdate <> '')
	{
		$strSql =
			"UPDATE b_dav_connections SET ".
			"	".$strUpdate." ".
			($bModifyDate ? ", MODIFIED = ".$DB::CurrentTimeFunction()." " : "").
			"WHERE ID = ".$id." ";

		$DB->Query($strSql, false, "File: ".__FILE__."
Line: ".__LINE__); } return $id; }