From: Mikael Nordfeldth Date: Sat, 13 Feb 2016 12:17:39 +0000 (+0100) Subject: Hide attachments in notices by silenced profiles X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=be14e15dac7d6dc53d2cfa83fda3fdaa86ee10ca;p=quix0rs-gnu-social.git Hide attachments in notices by silenced profiles --- diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index 4d4b451167..0ce19b0b1e 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -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) {