- Модуль: dav
- Путь к файлу: ~/bitrix/modules/dav/classes/general/webdavserver.php
- Класс: CDavWebDavServer
- Вызов: CDavWebDavServer::LOCK
protected function LOCK($locktoken, &$httpTimeout, &$owner, &$scope, &$type, $update)
{
/** @var CDavRequest $request */
$request = $this->request;
$requestPath = Encoding::convertEncoding($request->getPath(), 'UTF-8', SITE_CHARSET);
list($storage, $path) = self::ParsePath($requestPath);
if (!$storage)
{
return '409 Conflict';
}
$path = CDavVirtualFileSystem::GetLockPath("WS" . ($storage->getId()), $path);
// if (!$arRequestPath["id"] || $request->GetDepth() || !$handler->CheckPrivilegesByPath("DAV:write", $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;
}