aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-04-27 17:07:49 +0200
committerBrett Profitt <brett.profitt@gmail.com>2012-05-10 10:17:21 -0700
commit7d884d557626ba3b4da24d81a200d4e2d910e0b3 (patch)
tree845f74786e25becf969befe4881f11767eb04053 /mod
parent0c725e2ceeb9abf2e8b625961548928fa9bca9b2 (diff)
downloadelgg-7d884d557626ba3b4da24d81a200d4e2d910e0b3.tar.gz
elgg-7d884d557626ba3b4da24d81a200d4e2d910e0b3.tar.bz2
Fixes #2936. PDFs are downloaded "inline" (in the same navigator).
Diffstat (limited to 'mod')
-rw-r--r--mod/file/pages/file/download.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/mod/file/pages/file/download.php b/mod/file/pages/file/download.php
index 00e6d500e..76c1f1272 100644
--- a/mod/file/pages/file/download.php
+++ b/mod/file/pages/file/download.php
@@ -26,7 +26,7 @@ $filename = $file->originalfilename;
header("Pragma: public");
header("Content-type: $mime");
-if (strpos($mime, "image/") !== false) {
+if (strpos($mime, "image/") !== false || $mime == "application/pdf") {
header("Content-Disposition: inline; filename=\"$filename\"");
} else {
header("Content-Disposition: attachment; filename=\"$filename\"");