- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/webdavstorage.php
- Класс: CWebDavStorageCore
- Вызов: CWebDavStorageCore::getDirectory
public function getDirectory($id, array $extra, $skipCheckId = false)
{
if(!$skipCheckId && $this->generateId(array('ID' => $extra['id'], 'FILE' => false)) != $id)
{
return false;
}
//todo usage propfind with section_id options
$storageId = $this->getStorageId();
CTimeZone::Disable();
$dir = CIBlockSection::GetList(array(), array(
'IBLOCK_ID' => (int)CWebDavSymlinkHelper::getIblockIdForSectionId($extra['id']), //todo symlink logic. Usage propfind!
'ID' => (int)$extra['id'],
), false, array('ID', 'IBLOCK_ID', 'IBLOCK_SECTION_ID', 'CREATED_BY', 'MODIFIED_BY', 'PATH', 'NAME', 'TIMESTAMP_X', 'XML_ID', 'IBLOCK_CODE', CWebDavIblock::UF_LINK_SECTION_ID));
CTimeZone::Enable();
$dir = $dir->fetch();
if(!$dir || !is_array($dir))
{
return array();
}
$dir['PATH'] = implode('/', ($this->getPathArrayForSection($extra['id'])));
return $this->formatSectionToResponse($dir);
}