mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user