summaryrefslogtreecommitdiff
path: root/inc/media.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2008-12-02 22:03:22 +0100
committerAndreas Gohr <andi@splitbrain.org>2008-12-02 22:03:22 +0100
commitecebf3a8627f527cbd184b7907dd91f65764617b (patch)
treeb8cc9e688deccab5f9b3a78258f666ecc624c4c5 /inc/media.php
parent02a002e903ab4b1afa2e1c3d7c2b3e44d77783fa (diff)
downloadrpg-ecebf3a8627f527cbd184b7907dd91f65764617b.tar.gz
rpg-ecebf3a8627f527cbd184b7907dd91f65764617b.tar.bz2
Make content-disposition configurable in mime.conf FS#1541
With this patch it is possible to define if a file should be served as download or be displayed inside the browser (if supported) by configuring it in conf/mime.conf Mimetypes that should be served with a "Content-Disposition: attachment" header need to be prefixed with a exclamation mark. All others will be served inline. This will also fix a Problem with Flash 10. darcs-hash:20081202210322-7ad00-6e7ef30aff9322cd135311be77809187da121f3b.gz
Diffstat (limited to 'inc/media.php')
-rw-r--r--inc/media.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/media.php b/inc/media.php
index 3e54db512..29b2ec986 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -233,8 +233,8 @@ function media_upload($ns,$auth){
}
// check extensions
- list($fext,$fmime) = mimetype($file['name']);
- list($iext,$imime) = mimetype($id);
+ list($fext,$fmime,$dl) = mimetype($file['name']);
+ list($iext,$imime,$dl) = mimetype($id);
if($fext && !$iext){
// no extension specified in id - read original one
$id .= '.'.$fext;
@@ -492,7 +492,7 @@ function media_printfile($item,$auth,$jump){
}
// Prepare fileicons
- list($ext,$mime) = mimetype($item['file']);
+ list($ext,$mime,$dl) = mimetype($item['file']);
$class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
$class = 'select mediafile mf_'.$class;