- Модуль: dav
- Путь к файлу: ~/bitrix/modules/dav/classes/general/virtualfilesystem.php
- Класс: CAllDavVirtualFileSystem
- Вызов: CAllDavVirtualFileSystem::UpdateLock
static function UpdateLock($path, $token, &$timeout, &$owner, &$scope, &$type)
{
if (!$path || !$token)
{
return false;
}
unset(self::$lockCache[$path]);
if ($timeout < 1000000) // < 1000000 is a relative timestamp, so we add the current time
{
$timeout += time();
}
$dbResult = CDavVirtualFileSystem::GetList(array(), array("PATH" => $path, "ID" => $token), false, false, array("LOCK_OWNER", "LOCK_DEPTH", "LOCK_TYPE", "LOCK_SCOPE"));
if ($arResult = $dbResult->Fetch())
{
$owner = $arResult['LOCK_OWNER'];
$scope = $arResult['LOCK_SCOPE'];
$type = $arResult['LOCK_TYPE'];
try
{
self::Update($token, array("EXPIRES" => $timeout));
return true;
}
catch (Exception $e)
{
}
}
return false;
}