uawdijnntqw1x1x1
IP : 13.58.76.154
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
msk.axolotls.ru
/
bitrix
/
modules
/
disk
/
lib
/
internals
/
diskcomponent.php
/
/
<?php namespace Bitrix\Disk\Internals; use Bitrix\Disk\Storage; use Bitrix\Disk\User; use Bitrix\Main\ArgumentException; use Bitrix\Main\Loader; use Bitrix\Main\SystemException; use COption; abstract class DiskComponent extends BaseComponent { /** @var Storage */ protected $storage; /** * Checks required modules for the component. * @return $this * @throws SystemException * @throws \Bitrix\Main\LoaderException */ protected function checkRequiredModules() { if (!Loader::includeModule('disk')) { throw new SystemException('Install module "disk"'); } return $this; } /** * Prepares component parameters. * @return $this * @throws ArgumentException */ protected function prepareParams() { parent::prepareParams(); if(!empty($this->arParams['STORAGE'])) { if(!($this->arParams['STORAGE'] instanceof Storage)) { throw new ArgumentException('STORAGE must be instance of \Bitrix\Disk\Storage'); } } elseif(!empty($this->arParams['STORAGE_ID'])) { $this->arParams['STORAGE_ID'] = (int)$this->arParams['STORAGE_ID']; } else { if(empty($this->arParams['STORAGE_MODULE_ID'])) { throw new ArgumentException('STORAGE_MODULE_ID required'); } if(empty($this->arParams['STORAGE_ENTITY_TYPE'])) { throw new ArgumentException('STORAGE_ENTITY_TYPE required'); } if(!isset($this->arParams['STORAGE_ENTITY_ID'])) { throw new ArgumentException('STORAGE_ENTITY_ID required'); } } if(empty($this->arParams['PATH_TO_USER'])) { $siteId = SITE_ID; $currentUser = $this->loadCurrentUserModel(); $default = '/company/personal/user/#user_id#/'; if($currentUser && $currentUser->isExtranetUser()) { /** @noinspection PhpDynamicAsStaticMethodCallInspection */ $siteId = \CExtranet::getExtranetSiteID(); $default = '/extranet/contacts/personal/user/#user_id#/'; } $this->arParams['PATH_TO_USER'] = strtolower(COption::getOptionString('intranet', 'path_user', $default, $siteId)); } return $this; } private function loadCurrentUserModel() { $userId = $this->getUser()->getId(); if(!$userId || $userId <= 0) { return null; } $resultQuery = $this->getUser()->getById($userId); if(!$resultQuery instanceof \CDBResult) { return null; } $userData = $resultQuery->fetch(); if(!$userData) { return null; } return User::buildFromArray($userData); } /** * Initializes storage by component parameters. * @return $this */ protected function initializeStorage() { if(isset($this->arParams['STORAGE'])) { $this->storage = $this->arParams['STORAGE']; return $this; } elseif(isset($this->arParams['STORAGE_ID'])) { $this->storage = Storage::loadById($this->arParams['STORAGE_ID']); } else { $this->storage = Storage::load(array( 'MODULE_ID' => $this->arParams['STORAGE_MODULE_ID'], 'ENTITY_TYPE' => $this->arParams['STORAGE_ENTITY_TYPE'], 'ENTITY_ID' => $this->arParams['STORAGE_ENTITY_ID'], )); } return $this; } /** * Processes operations before runs action. * @param string $actionName Action name which will run. * @return bool */ protected function processBeforeAction($actionName) { parent::processBeforeAction($actionName); $this->initializeStorage(); $this ->application ->setPageProperty('BodyClass', $this->application->getPageProperty('BodyClass') . ' page-one-column') ; return true; } }
/var/www/axolotl/data/www/msk.axolotls.ru/bitrix/modules/disk/lib/internals/diskcomponent.php