diff --git a/app/controllers/file.php b/app/controllers/file.php index c53a2197b48fe7c0607643698a54915db921e8ba..e7378aab2cd2e475fa4ed43195cea890c6c9a1c8 100644 --- a/app/controllers/file.php +++ b/app/controllers/file.php @@ -253,17 +253,17 @@ class FileController extends AuthenticatedController { $this->include_navigation = Request::get('file_navigation', false); //check if the file area object is a FileRef: - if (Request::get("from_plugin")) { + $this->from_plugin = Request::get("from_plugin"); + if ($this->from_plugin) { $file_id = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "dispatch.php/file/details/") + strlen("dispatch.php/file/details/")); if (strpos($file_id, "?") !== false) { $file_id = substr($file_id, 0, strpos($file_id, "?")); } - $plugin = PluginManager::getInstance()->getPlugin(Request::get("from_plugin")); + $plugin = PluginManager::getInstance()->getPlugin($this->from_plugin); if (!$plugin) { throw new Trails_Exception(404, _('Plugin existiert nicht.')); } $this->file = $plugin->getPreparedFile($file_id); - $this->from_plugin = Request::get("from_plugin"); } else { $file_ref = FileRef::find($file_area_object_id); if ($file_ref) { @@ -320,7 +320,7 @@ class FileController extends AuthenticatedController $this->render_action('file_details'); } else { //file area object is not a FileRef: maybe it's a folder: - if (Request::get("from_plugin")) { + if ($this->from_plugin) { $this->folder = $plugin->getFolder($file_id); } else { $this->folder = FileManager::getTypedFolder($file_area_object_id); diff --git a/app/views/file/file_details.php b/app/views/file/file_details.php index 356043f3f83a59cfb7745c38d2aec77fc0a4b4f8..76f996a7bfe4cb667927d297e872f79c84b0db0d 100644 --- a/app/views/file/file_details.php +++ b/app/views/file/file_details.php @@ -1,3 +1,16 @@ +<?php +/** + * @var Flexi_Template $this + * @var FileController $controller + * @var Flexi_Template|null $file_info_template + * @var array $fullpath + * @var FileType $file + * @var string|null $previous_file_ref_id + * @var string|null $next_file_ref_id + * @var string|null $from_plugin + * @var bool $include_navigation + */ +?> <div id="file_details_window"> <?= $this->render_partial('file/_file_aside.php') ?>