From: Marcel Werk Date: Sun, 4 Dec 2016 20:00:47 +0000 (+0100) Subject: Fixed title of embedded media (non-images) X-Git-Tag: 3.0.0_RC_1~93 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1e130685ac11560d59ab1d88fc6be5f0c1751a1;p=GitHub%2FWoltLab%2FWCF.git Fixed title of embedded media (non-images) --- 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. *