summaryrefslogtreecommitdiff
path: root/actions/attachment.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-25 15:42:17 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-25 15:42:17 -0700
commit37796a8dc637d1fd787961fad3a40a5e1dbdb6bc (patch)
tree1a203b552180684dc6485bd5b46c857786275797 /actions/attachment.php
parent4662a4fa0dfe93d3819b9ffcae715fc465384a63 (diff)
Make shorturls in notice content point to AttachmentAction urls
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();
+ }
}
/**