X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fattachmentlist.php;h=4e39e59ca59519c00ea804ce9ab7e2c4496aa692;hb=57163e6fd69d560b462a1b9eaee054126e029703;hp=dcae917be36c17c8b0180d9d6982203601ba3016;hpb=0f938ff23479d92113620552eab76b50613c87e3;p=quix0rs-gnu-social.git diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index dcae917be3..4e39e59ca5 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -58,7 +58,7 @@ class AttachmentList extends Widget * * @param Notice $notice stream of notices from DB_DataObject */ - function __construct(Notice $notice, $out=null) + function __construct(Notice $notice, Action $out=null) { parent::__construct($out); $this->notice = $notice; @@ -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]); } } @@ -99,12 +99,12 @@ class AttachmentList extends Widget function showListStart() { - $this->out->elementStart('ol', array('class' => 'attachments')); + $this->out->elementStart('div', array('class' => 'attachments')); } function showListEnd() { - $this->out->elementEnd('ol'); + $this->out->elementEnd('div'); } /**