diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-02-15 15:10:15 +0100 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-02-15 15:10:15 +0100 |
commit | 2643fc174cfce2c89b096e1aa28b8433c1bd9088 (patch) | |
tree | 4219fa16c1e196fca55429092494051eb899891c /lib/exe/fetch.php | |
parent | 1da8dc976a4e9184fe550789a77d8e5cb866926f (diff) | |
parent | 0ba750c06b51626ccace39f0f6be7062eebb0a40 (diff) | |
download | rpg-2643fc174cfce2c89b096e1aa28b8433c1bd9088.tar.gz rpg-2643fc174cfce2c89b096e1aa28b8433c1bd9088.tar.bz2 |
Merge remote-tracking branch 'origin/master' into diff_navigation
Diffstat (limited to 'lib/exe/fetch.php')
-rw-r--r-- | lib/exe/fetch.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 5967494bf..5f82ad0e0 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -78,8 +78,8 @@ if (defined('SIMPLE_TEST')) { unset($evt); //handle image resizing/cropping - if((substr($MIME, 0, 5) == 'image') && $WIDTH) { - if($HEIGHT) { + if((substr($MIME, 0, 5) == 'image') && ($WIDTH || $HEIGHT)) { + if($HEIGHT && $WDITH) { $data['file'] = $FILE = media_crop_image($data['file'], $EXT, $WIDTH, $HEIGHT); } else { $data['file'] = $FILE = media_resize_image($data['file'], $EXT, $WIDTH, $HEIGHT); @@ -89,7 +89,7 @@ if (defined('SIMPLE_TEST')) { // finally send the file to the client $evt = new Doku_Event('MEDIA_SENDFILE', $data); if($evt->advise_before()) { - sendFile($data['file'], $data['mime'], $data['download'], $data['cache'], $data['ispublic']); + sendFile($data['file'], $data['mime'], $data['download'], $data['cache'], $data['ispublic'], $data['orig']); } // Do something after the download finished. $evt->advise_after(); // will not be emitted on 304 or x-sendfile |