From d1e130685ac11560d59ab1d88fc6be5f0c1751a1 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 4 Dec 2016 21:00:47 +0100 Subject: [PATCH] Fixed title of embedded media (non-images) --- .../files/lib/data/media/ViewableMedia.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php index 38c4b5e11a..fae20b0e71 100644 --- a/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php +++ b/wcfsetup/install/files/lib/data/media/ViewableMedia.class.php @@ -32,6 +32,17 @@ class ViewableMedia extends DatabaseObjectDecorator { */ protected static $baseClass = Media::class; + /** + * @inheritDoc + */ + public function getTitle() { + if ($this->title){ + return $this->title; + } + + return $this->getDecoratedObject()->getTitle(); + } + /** * Returns a textual representation of the media file to be used in templates. * -- 2.20.1