diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-12-02 22:03:22 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-12-02 22:03:22 +0100 |
commit | ecebf3a8627f527cbd184b7907dd91f65764617b (patch) | |
tree | b8cc9e688deccab5f9b3a78258f666ecc624c4c5 /inc/parser | |
parent | 02a002e903ab4b1afa2e1c3d7c2b3e44d77783fa (diff) | |
download | rpg-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/parser')
-rw-r--r-- | inc/parser/xhtml.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index fda1ef36e..58ff5e7b1 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -675,7 +675,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $render = ($linking == 'linkonly') ? false : true; $link = $this->_getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render); - list($ext,$mime) = mimetype($src); + list($ext,$mime,$dl) = mimetype($src); if(substr($mime,0,5) == 'image' && $render){ $link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),($linking=='direct')); }elseif($mime == 'application/x-shockwave-flash' && $render){ @@ -705,7 +705,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['url'] = ml($src,array('cache'=>$cache)); - list($ext,$mime) = mimetype($src); + list($ext,$mime,$dl) = mimetype($src); if(substr($mime,0,5) == 'image' && $render){ // link only jpeg images // if ($ext != 'jpg' && $ext != 'jpeg') $noLink = true; @@ -909,7 +909,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $ret = ''; - list($ext,$mime) = mimetype($src); + list($ext,$mime,$dl) = mimetype($src); if(substr($mime,0,5) == 'image'){ // first get the $title if (!is_null($title)) { |