From af700ea27703bbec5aa1078a84f9fd44c0260322 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Tue, 26 May 2009 21:20:04 -0400 Subject: Let's you upload a file with a notice and have it shown with other attachments. --- lib/attachmentlist.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/attachmentlist.php') 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(); -- cgit v1.2.3-54-g00ecf