]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Hide attachments in notices by silenced profiles
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 13 Feb 2016 12:17:39 +0000 (13:17 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 13 Feb 2016 12:17:39 +0000 (13:17 +0100)
lib/attachmentlist.php

index 4d4b4511672aa0167697df58727a81a07533ce6d..0ce19b0b1ed38c66859d34113a18932ba269ce4d 100644 (file)
@@ -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) {