uawdijnntqw1x1x1
IP : 18.225.56.116
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
/
kirov.axolotls.ru
/
bitrix
/
modules
/
rest
/
lib
/
controller
/
configuration.php
/
/
<?php namespace Bitrix\Rest\Controller; use Bitrix\Main\Engine\Controller; use Bitrix\Main\Engine\ActionFilter; use Bitrix\Main\Engine\Response\Zip\Archive; use Bitrix\Main\Engine\Response\Zip\ArchiveEntry; use Bitrix\Main\Localization\Loc; use Bitrix\Rest\Configuration\Helper; use Bitrix\Rest\Configuration\Structure; Loc::loadLanguageFile(__FILE__); class Configuration extends Controller { /** * Download zip export. * @return Archive */ public function downloadAction() { if (\CRestUtil::isAdmin() && Helper::getInstance()->enabledZipMod()) { $postfix = $this->getRequest()->getQuery('postfix'); if (!empty($postfix)) { $context = Helper::getInstance()->getContextUser($postfix); $structure = new Structure($context); $name = $structure->getArchiveName(); if(empty($name)) { $name = Helper::DEFAULT_ARCHIVE_NAME; } $name .= '.'.Helper::DEFAULT_ARCHIVE_FILE_EXTENSIONS; $archive = new Archive($name); $files = []; $fileList = $structure->getFileList(); if(is_array($fileList)) { $folderName = Helper::STRUCTURE_FILES_NAME; foreach ($fileList as $id => $file) { $entry = ArchiveEntry::createFromFileId($id); if ($entry) { $files[$id] = array_merge( [ 'NAME' => $entry->getName(), ], $file ); $entry->setName("/{$folderName}/{$id}"); $archive->addEntry($entry); } } } if($files) { $structure->saveContent(false, Helper::STRUCTURE_FILES_NAME, $files); } $folderFiles = $structure->getConfigurationFileList(); foreach ($folderFiles as $id => $name) { $entry = ArchiveEntry::createFromFileId($id); if ($entry) { $entry->setName($name); $archive->addEntry($entry); } } return $archive; } } return null; } public function getDefaultPreFilters() { return [ new ActionFilter\Authentication() ]; } }
/var/www/axolotl/data/www/kirov.axolotls.ru/bitrix/modules/rest/lib/controller/configuration.php