public function AjaxFilesPub() { $oAccount = null; $oResult = array(); $oMin = \CApi::Manager('min'); $sHash = $this->getParamValue('Hash'); $sPath = $this->getParamValue('Path', ''); $mMin = $oMin->getMinByHash($sHash); if (!empty($mMin['__hash__'])) { $oAccount = $this->oApiUsers->getAccountById($mMin['Account']); if ($oAccount) { if (!$this->oApiCapability->isFilesSupported($oAccount)) { throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::FilesNotAllowed); } $sType = $mMin['Type']; $sPath = implode('/', array($mMin['Path'], $mMin['Name'])) . $sPath; $oResult['Items'] = $this->oApiFilestorage->getFiles($oAccount, $sType, $sPath); $oResult['Quota'] = $this->oApiFilestorage->getQuota($oAccount); } } return $this->DefaultResponse($oAccount, __FUNCTION__, $oResult); }