diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-07-01 00:29:30 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-07-01 00:29:30 +0000 |
commit | d1e02e6aa2f75a311c46a465bc044211edb36ed9 (patch) | |
tree | eb0a3986e623c75f876fca8d16de7d09dd35a7af /actions | |
parent | db92957e150c3cd86dfee9f51056c0c5101e575e (diff) | |
download | elgg-d1e02e6aa2f75a311c46a465bc044211edb36ed9.tar.gz elgg-d1e02e6aa2f75a311c46a465bc044211edb36ed9.tar.bz2 |
fix to support inline if the view is specified - could be used by rss feeds or slideshows
Diffstat (limited to 'actions')
-rw-r--r-- | actions/download.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/download.php b/actions/download.php index 3b39c831d..2736e5438 100644 --- a/actions/download.php +++ b/actions/download.php @@ -9,12 +9,17 @@ $file_guid = (int) get_input("file_guid");
$file = get_entity($file_guid);
+ $view = get_input("view");
+
if ($file) {
$filename = $file->originalfilename;
$mime = $file->mimetype;
header("Content-type: $mime");
- header("Content-Disposition: attachment; filename=\"$filename\"");
+ if ($view == "inline")
+ header("Content-Disposition: inline; filename=\"$filename\"");
+ else
+ header("Content-Disposition: attachment; filename=\"$filename\"");
$readfile = new ElggFile($file_guid);
|