summaryrefslogtreecommitdiff
path: root/actions/attachment.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-05-24 04:43:34 -0400
committerRobin Millette <millette@controlyourself.ca>2009-05-24 04:43:34 -0400
commitb5ac6e31f2f148164860aeabec6899b75d7292ec (patch)
tree5016a9624a923793f231d066d7519e8e3a0a8075 /actions/attachment.php
parent456f3eeb50fc1cafaa66ab5c0bdcdcaa5ca4bcd0 (diff)
Rearranged attachment info to only appear on each applicable notice page and thru an ajax popup.
Diffstat (limited to 'actions/attachment.php')
-rw-r--r--actions/attachment.php10
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;
}