summaryrefslogtreecommitdiff
path: root/lib/attachmentlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/attachmentlist.php')
-rw-r--r--lib/attachmentlist.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php
index d0478bad3..a58a50f6f 100644
--- a/lib/attachmentlist.php
+++ b/lib/attachmentlist.php
@@ -80,13 +80,15 @@ 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' =>'attachment'));
$this->out->element('dt', null, _('Attachments'));
$this->out->elementStart('dd');
$this->out->elementStart('ul', array('class' => 'attachments'));
- $atts = new File;
- $att = $atts->getAttachments($this->notice->id);
foreach ($att as $n=>$attachment) {
$item = $this->newListItem($attachment);
$item->show();