diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-26 23:24:01 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-26 23:24:01 -0400 |
commit | 648d967226f3b47aa6237d2be9d1a82df4f78402 (patch) | |
tree | 2592f56f0073ee21ce320a158233fdb1bd2710c4 /actions/attachment.php | |
parent | 6335c9cf59b384da24506c4a3f799315fbbc4b09 (diff) | |
parent | 0b53a820c2b4224b66b2a24f67302b4c5ca1deed (diff) |
Merge branch '0.8.x' into userdesign
Conflicts:
lib/attachmentlist.php
lib/noticelist.php
Diffstat (limited to 'actions/attachment.php')
-rw-r--r-- | actions/attachment.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/actions/attachment.php b/actions/attachment.php index b9187ff08..16ee723d9 100644 --- a/actions/attachment.php +++ b/actions/attachment.php @@ -31,8 +31,6 @@ if (!defined('LACONICA')) { exit(1); } -//require_once INSTALLDIR.'/lib/personalgroupnav.php'; -//require_once INSTALLDIR.'/lib/feedlist.php'; require_once INSTALLDIR.'/lib/attachmentlist.php'; /** @@ -67,11 +65,11 @@ class AttachmentAction extends Action { parent::prepare($args); - $id = $this->arg('attachment'); - - $this->attachment = File::staticGet($id); + if ($id = $this->trimmed('attachment')) { + $this->attachment = File::staticGet($id); + } - if (!$this->attachment) { + if (empty($this->attachment)) { $this->clientError(_('No such attachment.'), 404); return false; } @@ -178,10 +176,8 @@ class AttachmentAction extends Action function showContent() { - $this->elementStart('ul', array('class' => 'attachments')); $ali = new Attachment($this->attachment, $this); $cnt = $ali->show(); - $this->elementEnd('ul'); } /** |