Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2011-08-04 16:29:56 +0400
committerMichal Čihař <mcihar@suse.cz>2011-08-04 16:29:56 +0400
commit1a5154bd876edf2b703c7eebfa6650a4f242c33d (patch)
tree0b2a0c1fe547cd0f2a0f7f60c243bd8ef9c5bfa4 /transformation_wrapper.php
parentd6c2dfb51b1a2977ad03033cdfe5c74709313f9c (diff)
Use new function for download headers
Diffstat (limited to 'transformation_wrapper.php')
-rw-r--r--transformation_wrapper.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/transformation_wrapper.php b/transformation_wrapper.php
index f229bd3a2f..577a4353a0 100644
--- a/transformation_wrapper.php
+++ b/transformation_wrapper.php
@@ -61,16 +61,17 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
require_once './libraries/header_http.inc.php';
// [MIME]
if (isset($ct) && !empty($ct)) {
- $content_type = 'Content-Type: ' . $ct;
+ $mime_type = $ct;
} else {
- $content_type = 'Content-Type: ' . (isset($mime_map[$transform_key]['mimetype']) ? str_replace('_', '/', $mime_map[$transform_key]['mimetype']) : $default_ct) . (isset($mime_options['charset']) ? $mime_options['charset'] : '');
+ $mime_type = (isset($mime_map[$transform_key]['mimetype']) ? str_replace('_', '/', $mime_map[$transform_key]['mimetype']) : $default_ct) . (isset($mime_options['charset']) ? $mime_options['charset'] : '');
}
-header($content_type);
-if (isset($cn) && !empty($cn)) {
- header('Content-Disposition: attachment; filename=' . $cn);
+if (empty($cn)) {
+ $cn = 'download.bin';
}
+PMA_download_header($mime_type, $cn);
+
if (! isset($resize)) {
echo $row[$transform_key];
} else {