]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/attachmentlist.php
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
[quix0rs-gnu-social.git] / lib / attachmentlist.php
index 559962accab60e4614f35773001a22182c5fb734..61749dca578a1cf0688bb2290b26217990b37dd1 100644 (file)
@@ -80,13 +80,14 @@ class AttachmentList extends Widget
 
     function show()
     {
+        $atts = new File;
+        $att = $atts->getAttachments($this->notice->id);
+        if (empty($att)) return 0;
         $this->out->elementStart('dl', array('id' =>'attachments'));
         $this->out->element('dt', null, _('Attachments'));
         $this->out->elementStart('dd');
         $this->out->elementStart('ol', array('class' => 'attachments'));
 
-        $atts = new File;
-        $att = $atts->getAttachments($this->notice->id);
         foreach ($att as $n=>$attachment) {
             $item = $this->newListItem($attachment);
             $item->show();