1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-18 20:31:19 +02:00

Bzip2 import

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1041 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-08-29 13:50:28 +00:00
parent afbba65f5c
commit 0a2d81d75a
2 changed files with 8 additions and 2 deletions

View File

@@ -166,7 +166,10 @@ function get_file($key, $decompress = false) {
if (!$file || $file["error"]) {
return $file["error"];
}
return file_get_contents($decompress && ereg('\\.gz$', $file["name"]) ? "compress.zlib://$file[tmp_name]" : $file["tmp_name"]); //! may not be reachable because of open_basedir
return file_get_contents($decompress && ereg('\\.gz$', $file["name"]) ? "compress.zlib://$file[tmp_name]"
: ($decompress && ereg('\\.bz2$', $file["name"]) ? "compress.bzip2://$file[tmp_name]"
: $file["tmp_name"]
)); //! may not be reachable because of open_basedir
}
function upload_error($error) {