• Модуль: dav
  • Путь к файлу: ~/bitrix/modules/dav/classes/general/groupdav.php
  • Класс: constCDavGroupDav
  • Вызов: CDavGroupDav::LOCK
protected function LOCK($locktoken, &$httpTimeout, &$owner, &$scope, &$type, $update)
{
	$arRequestPath = self::ParsePath($this->request->GetPath());
	$path = CDavVirtualFileSystem::GetLockPath($arRequestPath["application"], $arRequestPath["id"]);

	$handler = $this->GetApplicationHandler($arRequestPath["application"]);

	if (!$arRequestPath["id"] || $this->request->GetDepth() || !$handler->CheckPrivilegesByPath("DAV:write", $this->request->GetPrincipal(), $arRequestPath["site"], $arRequestPath["account"], $arRequestPath["path"]))
		return '409 Conflict';

	$httpTimeout = time() + 300;

	if (!$update)
	{
		$ret = CDavVirtualFileSystem::Lock($path, $locktoken, $httpTimeout, $owner, $scope, $type);
		return $ret ? '200 OK' : '409 Conflict';
	}

	$ret = CDavVirtualFileSystem::UpdateLock($path, $locktoken, $httpTimeout, $owner, $scope, $type);
	return $ret;
}