/** * Confirm file deletion * * @param string $file * @param string $path * @param string $cabin */ protected function commonConfirmDeleteFile(string $file, string $path, string $cabin) { if (!$this->permCheck()) { \Airship\redirect($this->airship_cabin_prefix); } list($publicPath, $root) = $this->loadCommonData($path, $cabin); if (empty($root)) { $fileInfo = $this->files->getFileInfo($cabin, null, $file); } else { $fileInfo = $this->files->getFileInfo($cabin, $root, $file); } $post = $this->post(); if (!empty($post)) { $this->files->deleteFile($fileInfo); \Airship\redirect($this->airship_cabin_prefix . '/' . $this->path_middle . '/' . $cabin, ['dir' => $path]); } $this->lens('files/delete', ['cabins' => $this->getCabinNamespaces(), 'file' => $fileInfo, 'root_dir' => $this->root_dir, 'dir' => $this->root_dir . '/' . $path, 'cabin' => $cabin, 'pathinfo' => $publicPath]); }