public function index(ServiceProFTPd $service, HTTPRequest $request) { if ($this->userIsAdmin($request)) { $service->renderInPage($request, $GLOBALS['Language']->getText('global', 'Admin'), 'admin', $this->getPresenter($request->getProject())); } exit_error($GLOBALS['Language']->getText('global', 'error_perm_denied'), $GLOBALS['Language']->getText('plugin_proftpd', 'error_not_admin')); }
private function renderDirectoryContent(ServiceProFTPd $service, HTTPRequest $request, DirectoryPathParser $path_parser, Project $project, $path) { $remove_parent_directory_listing = $path == '' ? true : false; $items = $this->parser->parseDirectory($project->getUnixName() . DIRECTORY_SEPARATOR . $path, $remove_parent_directory_listing); $service->renderInPage($request, $project->getPublicName() . ' / ' . $path, 'index', new ExplorerPresenter($path_parser->getPathParts($path), $path, $items, $project)); }