- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/editdoccomponentbase.php
- Класс: CWebDavEditDocComponentBase
- Вызов: CWebDavEditDocComponentBase::getFileData
protected function getFileData()
{
$webdav = $this->getWebdav();
if(!empty($this->arParams['fileId']) && $this->arParams['fileId'] != $webdav->arParams['file_array']['ID'])
{
$entityType = static::getEntityType($webdav->arParams['element_array']['IBLOCK_CODE']);
$document = $webdav->findHistoryDocumentByFileId(
$webdav->arParams['element_array']['ID'],
$this->arParams['fileId'],
static::getEntityIdDocumentData($entityType, array('ELEMENT_ID' => $webdav->arParams['element_array']['ID']))
);
$this->setVersionId((int)$document['ID']);
}
list(
$arFile,
$options,
$fullpath,
$elementName
) = $webdav->getHistoryFileData($webdav->arParams['element_array']['ID'], $this->getVersionId()?:0, $params);
return array(
'name' => $elementName,
'mimeType' => $arFile['CONTENT_TYPE']?: $webdav->get_mime_type($elementName),
'src' => $fullpath,
'size' => $arFile['FILE_SIZE'],
);
}