summaryrefslogtreecommitdiff
path: root/actions/attachment.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-26 18:32:18 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-26 18:32:18 -0700
commita68722c9c75cd9dc8ed84e186f3b4ecc5556b1a3 (patch)
tree564b804360160c908fe6c4469824f1ee9c194b25 /actions/attachment.php
parent60b47d879781e28c0f08978bba43d5b9ad22b32a (diff)
parent96ba25c34bc03c5b72c13241a00e467a0585cd2a (diff)
Merge branch 'attachment-fixup' into 0.8.x
* attachment-fixup: Added readonly flag to FileAction just in case Make shorturls in notice content point to AttachmentAction urls Add attachment action back into router
Diffstat (limited to 'actions/attachment.php')
-rw-r--r--actions/attachment.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/actions/attachment.php b/actions/attachment.php
index e4dc0e054..ee4cd9640 100644
--- a/actions/attachment.php
+++ b/actions/attachment.php
@@ -111,7 +111,16 @@ class AttachmentAction extends Action
function handle($args)
{
parent::handle($args);
- $this->showPage();
+
+ if (empty($this->attachment->filename)) {
+
+ // if it's not a local file, gtfo
+
+ common_redirect($this->attachment->url, 303);
+
+ } else {
+ $this->showPage();
+ }
}
/**