- Модуль: webdav
- Путь к файлу: ~/bitrix/modules/webdav/classes/iblocksocnetbizproc.php
- Класс: CIBlockDocumentWebdavSocnet
- Вызов: CIBlockDocumentWebdavSocnet::needProxyToDiskByDocType
static function needProxyToDiskByDocType($documentType)
{
if(!(BitrixMainConfigOption::get('disk', 'successfully_converted', false) && CModule::includeModule('disk')))
{
return false;
}
if(empty($documentType))
{
return false;
}
$storage = null;
if(mb_substr($documentType, 0, 7) == 'STORAGE')
{
$storageId = (int)mb_substr($documentType, 8);
if($storageId)
{
$storage = BitrixDiskStorage::loadById($storageId);
}
if($storage)
{
return $storage;
}
}
list(, $iblockId, $typeLib, $entityId) = explode('_', $documentType);
if($typeLib == 'user')
{
$storage = BitrixDiskDriver::getInstance()->getStorageByUserId($entityId);
}
elseif($typeLib == 'group')
{
$storage = BitrixDiskDriver::getInstance()->getStorageByGroupId($entityId);
}
else
{
return false;
}
return $storage;
}