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

Compress export and import

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1032 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-08-28 11:49:57 +00:00
parent 1bc77f88d2
commit 25f01d352a
10 changed files with 106 additions and 70 deletions

View File

@@ -10,9 +10,9 @@ page_header(lang('SQL command'), $error);
if (!$error && $_POST) {
$query = $_POST["query"];
if ($_POST["webfile"]) {
$query = @file_get_contents("adminer.sql");
$query = @file_get_contents(file_exists("adminer.sql") ? "adminer.sql" : "compress.zlib://adminer.sql.gz");
} elseif ($_POST["file"]) {
$query = get_file("sql_file");
$query = get_file("sql_file", true);
}
if (is_string($query)) { // get_file() returns error as number, file_get_contents as false
$space = "(\\s|/\\*.*\\*/|(#|-- )[^\n]*\n|--\n)";