From: Matthias Schmidt Date: Sat, 2 Jul 2016 11:26:17 +0000 (+0200) Subject: Fix media file access in ACP when not logged-in in frontend X-Git-Tag: 3.0.0_Beta_1~1275 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93ce9f8dd24a14030b2b7a0fbb431f82f6ab6538;p=GitHub%2FWoltLab%2FWCF.git Fix media file access in ACP when not logged-in in frontend --- 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 ]));