Fix export of SQL for Safari (bug #1113015).

This commit is contained in:
Michal Čihař
2005-02-08 15:12:47 +00:00
parent 1df092f4d7
commit f07464e5c3
2 changed files with 13 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-02-08 Michal Čihař <michal@cihar.com>
* export.php: Fix export of SQL for Safari (bug #1113015).
2005-02-07 Marc Delisle <lem9@users.sourceforge.net> 2005-02-07 Marc Delisle <lem9@users.sourceforge.net>
* libraries/dbi/*: bug #1116933, PMA_DBI_free_result(): * libraries/dbi/*: bug #1116933, PMA_DBI_free_result():
do not send a boolean to mysqli_free_result() or mysql_free_result(), do not send a boolean to mysqli_free_result() or mysql_free_result(),

View File

@@ -230,7 +230,12 @@ if ($asfile) {
$mime_type = 'application/x-tex'; $mime_type = 'application/x-tex';
} else { } else {
$filename .= '.sql'; $filename .= '.sql';
$mime_type = 'text/x-sql'; // text/x-sql is correct MIME type, however safari ignores further
// Content-Disposition header, so we must force it to download it this
// way...
$mime_type = PMA_USR_BROWSER_AGENT == 'SAFARI'
? 'application/octet-stream'
: 'text/x-sql';
} }
// If dump is going to be compressed, set correct encoding or mime_type and add // If dump is going to be compressed, set correct encoding or mime_type and add