mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
Customizable export filename
This commit is contained in:
@@ -730,6 +730,9 @@ DROP PROCEDURE adminer_alter;
|
||||
($ext == "tar" ? "application/x-tar" :
|
||||
($ext == "sql" || $output != "file" ? "text/plain" : "text/csv") . "; charset=utf-8"
|
||||
))));
|
||||
if ($output != "text") {
|
||||
header("Content-Disposition: attachment; filename=" . friendly_url($identifier != "" ? $identifier : (SERVER != "" ? SERVER : "localhost")) . ".$ext" . ($output != "file" && !ereg('[^0-9a-z]', $output) ? ".$output" : ""));
|
||||
}
|
||||
if ($output == "bz2") {
|
||||
ob_start('bzcompress', 1e6);
|
||||
}
|
||||
|
@@ -803,10 +803,6 @@ function search_tables() {
|
||||
function dump_headers($identifier, $multi_table = false) {
|
||||
global $adminer;
|
||||
$return = $adminer->dumpHeaders($identifier, $multi_table);
|
||||
$output = $_POST["output"];
|
||||
if ($output != "text") {
|
||||
header("Content-Disposition: attachment; filename=" . friendly_url($identifier != "" ? $identifier : (SERVER != "" ? SERVER : "localhost")) . ".$return" . ($output != "file" && !ereg('[^0-9a-z]', $output) ? ".$output" : ""));
|
||||
}
|
||||
session_write_close();
|
||||
return $return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user