mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Fix gzip export (fixes #896)
This commit is contained in:
@@ -937,7 +937,10 @@ class Adminer {
|
||||
($ext == "sql" || $output != "file" ? "text/plain" : "text/csv") . "; charset=utf-8"
|
||||
)));
|
||||
if ($output == "gz") {
|
||||
ob_start('ob_gzencode', 1e6);
|
||||
ob_start(function ($string) {
|
||||
// ob_start() callback receives an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
return gzencode($string);
|
||||
}, 1e6);
|
||||
}
|
||||
return $ext;
|
||||
}
|
||||
|
@@ -631,15 +631,6 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
return ($paths[JUSH] ? "<a href='" . h($urls[JUSH] . $paths[JUSH] . (JUSH == 'mssql' ? "?view=sql-server-ver$version" : "")) . "'" . target_blank() . ">$text</a>" : "");
|
||||
}
|
||||
|
||||
/** Wrap gzencode() for usage in ob_start()
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function ob_gzencode($string) {
|
||||
// ob_start() callback receives an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
return gzencode($string);
|
||||
}
|
||||
|
||||
/** Compute size of database
|
||||
* @param string
|
||||
* @return string formatted
|
||||
|
@@ -1,4 +1,5 @@
|
||||
Adminer dev:
|
||||
Fix gzip export (bug #896)
|
||||
Fix importing multiple SQL files not terminated by semicolon
|
||||
Use <datalist> for altering collations
|
||||
|
||||
|
Reference in New Issue
Block a user