X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fattachmentlist.php;h=0ce19b0b1ed38c66859d34113a18932ba269ce4d;hb=dd8e17a3874aa99063b62b51e9a637a5abb0b923;hp=dcae917be36c17c8b0180d9d6982203601ba3016;hpb=1644608376a583d4dcf5d5b64bf6fa3737734ca0;p=quix0rs-gnu-social.git diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index dcae917be3..0ce19b0b1e 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -76,8 +76,8 @@ class AttachmentList extends Widget { $attachments = $this->notice->attachments(); foreach ($attachments as $key=>$att) { - // Only show attachments representable with a title - if ($att->getTitle() === null) { + // Remove attachments which are not representable with neither a title nor thumbnail + if ($att->getTitle() === null && !$att->hasThumbnail()) { unset($attachments[$key]); } } @@ -85,6 +85,12 @@ class AttachmentList extends Widget return 0; } + if ($this->notice->getProfile()->isSilenced()) { + // TRANS: Message for inline attachments list in notices when the author has been silenced. + $this->element('div', ['class'=>'error'], _('Attachments are hidden because this profile has been silenced.')); + return 0; + } + $this->showListStart(); foreach ($attachments as $att) {