- Модуль: disk
- Путь к файлу: ~/bitrix/modules/disk/lib/bitrix24disk/legacy/storagecontroller.php
- Класс: BitrixDiskBitrix24DiskLegacyStorageController
- Вызов: StorageController::processActionInitialize
protected function processActionInitialize()
{
$information = new Bitrix24DiskInformation($this->getUser());
if (!$information->hasInstallationDatetime())
{
$information->setInstallationDatetime(time());
}
$this->enableIgnoreQuotaError();
$userStorageId = $this->getUserStorageId();
$storage = $this->getStorageObject();
$storage->setStorageId($userStorageId);
$userModel = User::loadById($this->getUser()->getId());
if (!$userModel)
{
throw new ObjectNotFoundException("Could not find user model for id {$this->getUser()->getId()}");
}
$storageModel = Driver::getInstance()->getStorageByUserId($this->getUser()->getId());
if(!$storageModel)
{
throw new ObjectNotFoundException("Could not find storage model for user {$this->getUser()->getId()}");
}
$isExtranetUser = $userModel->isExtranetUser();
$this->sendJsonSuccessResponse(array(
'userId' => (string)$this->getUser()->getID(),
'userStorageId' => $storage->getStringStorageId(),
'pathToUserLib' => $this->getPathToUserLib($userModel, $storageModel),
'pathToDiscuss' => $this->getPathToDiscuss($userModel),
'userStorageExtra' => array(
'iblockId' => (string)$userStorageId['IBLOCK_ID'],
'sectionId'=> (string)$userStorageId['IBLOCK_SECTION_ID'],
),
'isB24' => (bool)isModuleInstalled('bitrix24'),
'isExtranetUser' => (bool)$isExtranetUser,
'version'=> self::VERSION,
'token_sid' => bitrix_sessid(),
'defaultChunkSize' => Bitrix24DiskUploadFileManager::DEFAULT_CHUNK_SIZE,
'maxChunkSize' => $this->getMaxUploadSize(),
));
}