]> git.joonet.de Git - adminer.git/commitdiff
Declare support for adminer.sql.gz
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 27 Sep 2009 07:27:16 +0000 (07:27 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Sun, 27 Sep 2009 07:27:16 +0000 (07:27 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1153 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/sql.inc.php

index 5fdf40af7b1eae398ae26c126a841179975e1407..5047f6fe081c420ce69a8e4644e67df09b6a8c2b 100644 (file)
@@ -140,7 +140,15 @@ if (!ini_get("file_uploads")) {
 <input type="submit" name="file" value="<?php echo lang('Run file'); ?>">
 <?php } ?>
 
-<p><?php echo lang('Webserver file %s', '<code>adminer.sql</code>'); ?> <input type="submit" name="webfile" value="<?php echo lang('Run file'); ?>">
+<p><?php
+$compress = array();
+foreach (array("gz" => "zlib", "bz2" => "bzip2") as $key => $val) {
+       if (in_array("compress.$val", stream_get_wrappers())) {
+               $compress[] = ".$key";
+       }
+}
+echo lang('Webserver file %s', "<code>adminer.sql" . ($compress ? "[" . implode("|", $compress) . "]" : "") . "</code>");
+?> <input type="submit" name="webfile" value="<?php echo lang('Run file'); ?>">
 
 <?php
 if ($history) {