From 93ce9f8dd24a14030b2b7a0fbb431f82f6ab6538 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 2 Jul 2016 13:26:17 +0200 Subject: [PATCH] Fix media file access in ACP when not logged-in in frontend --- .../install/files/lib/acp/page/MediaPage.class.php | 13 +++++++++++++ .../install/files/lib/data/media/Media.class.php | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 wcfsetup/install/files/lib/acp/page/MediaPage.class.php diff --git a/wcfsetup/install/files/lib/acp/page/MediaPage.class.php b/wcfsetup/install/files/lib/acp/page/MediaPage.class.php new file mode 100644 index 0000000000..cabc13bea6 --- /dev/null +++ b/wcfsetup/install/files/lib/acp/page/MediaPage.class.php @@ -0,0 +1,13 @@ + + * @package WoltLabSuite\Core\Acp\Page + * @since 3.0 + */ +class MediaPage extends \wcf\page\MediaPage {} diff --git a/wcfsetup/install/files/lib/data/media/Media.class.php b/wcfsetup/install/files/lib/data/media/Media.class.php index dd10d0d1ed..0d4b41c12c 100644 --- a/wcfsetup/install/files/lib/data/media/Media.class.php +++ b/wcfsetup/install/files/lib/data/media/Media.class.php @@ -99,9 +99,8 @@ class Media extends DatabaseObject implements ILinkableObject, IRouteController, /** * @inheritDoc */ - public function getLink($articleID = null, $boxID = null, $messageObjectType = null, $messageID = null) { + public function getLink() { return LinkHandler::getInstance()->getLink('Media', array_merge($this->linkParameters, [ - 'forceFrontend' => true, 'object' => $this ])); } @@ -135,7 +134,6 @@ class Media extends DatabaseObject implements ILinkableObject, IRouteController, } return LinkHandler::getInstance()->getLink('Media', array_merge($this->linkParameters, [ - 'forceFrontend' => true, 'object' => $this, 'thumbnail' => $size ])); -- 2.20.1