- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/iblockbizprochistory.php
- Класс: CWebdavDocumentHistory
- Вызов: CWebdavDocumentHistory::IsHistoryUpdate
static function IsHistoryUpdate($documentID)
{
global $USER;
static $arHistoryFields = array("ID", "DOCUMENT_ID", "MODIFIED", "DOCUMENT");
$historyService = self::GetHistoryService();
$result = false;
if (self::IsGlueEnabled())
{
$arFilter = array(
"DOCUMENT_ID" => $documentID,
"USER_ID" => $USER->GetID()
);
$dbDoc = $historyService->GetHistoryList(
array("ID" => "DESC"),
$arFilter,
false,
false,
$arHistoryFields
);
CTimeZone::Disable();
if ($dbDoc && ($arDoc = $dbDoc->Fetch())) // get the last history record
{
CTimeZone::Enable();
if (CWebdavDocumentHistory::GetHistoryState($documentID, $arDoc['ID'], $arDoc) == 'Y')
{
$result = $arDoc;
}
}
else
{
CTimeZone::Enable();
}
}
return $result;
}