1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 03:24:01 +02:00

Plugin for including date in export filename

This commit is contained in:
Jakub Vrana
2012-06-29 14:41:47 -07:00
parent f158d5e392
commit b78b0cd109
6 changed files with 40 additions and 7 deletions

View File

@@ -505,10 +505,13 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
}
}
function dumpFilename($identifier) {
return friendly_url($identifier);
}
function dumpHeaders($identifier, $multi_table = false) {
$ext = "csv";
header("Content-Type: text/csv; charset=utf-8");
header("Content-Disposition: attachment; filename=" . friendly_url($identifier) . ".$ext");
return $ext;
}