diff options
author | Sarven Capadisli <csarven@csarven-laptop.(none)> | 2009-05-24 19:49:02 -0400 |
---|---|---|
committer | Sarven Capadisli <csarven@csarven-laptop.(none)> | 2009-05-24 19:49:02 -0400 |
commit | 31743dd36807e520702c29973eacd067717a74b7 (patch) | |
tree | 1617c5ef67d16c917b6f09b30e66da43f1939b3f /actions/attachment.php | |
parent | 5a1c95d52fdca199957e47903819d16acaea590e (diff) | |
parent | 69f9bce276d86538c176e0c26e734ba694119864 (diff) |
Merge branch '0.8.x' of git://gitorious.org/laconica/dev into 0.8.x
Diffstat (limited to 'actions/attachment.php')
-rw-r--r-- | actions/attachment.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/actions/attachment.php b/actions/attachment.php index b9187ff08..c51c75120 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; } |