From 37796a8dc637d1fd787961fad3a40a5e1dbdb6bc Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 25 Jun 2009 15:42:17 -0700 Subject: Make shorturls in notice content point to AttachmentAction urls --- actions/attachment.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'actions/attachment.php') 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(); + } } /** -- cgit v1.2.3-54-g00ecf