]> git.joonet.de Git - adminer.git/commitdiff
SQLite version supports two systems
authorJakub Vrana <jakub@vrana.cz>
Fri, 28 May 2010 09:13:37 +0000 (11:13 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 28 May 2010 09:13:37 +0000 (11:13 +0200)
adminer/include/adminer.inc.php
compile.php

index db6028fad1440eaa016c568f3a3f033ac97d605b..9681d2ab5b08f9ad4dfbb8cb38cd0c30d212cd70 100644 (file)
@@ -39,7 +39,7 @@ class Adminer {
                global $drivers, $possible_drivers;
                ?>
 <table cellspacing="0">
-<tr><th><?php echo lang('System'); ?><td><?php echo (count($possible_drivers) > 3 ? html_select("driver", $drivers, DRIVER) : "<input type='hidden' name='driver' value='" . key($drivers) . "'>" . reset($drivers)); ?></tr>
+<tr><th><?php echo lang('System'); ?><td><?php echo html_select("driver", $drivers, DRIVER); ?>
 <tr><th><?php echo lang('Server'); ?><td><input name="server" value="<?php echo h(SERVER); ?>">
 <tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
index 44a37f79b386a1cfa95216fa578606c389464efa..455ffeca01d44b4426420fa5759f5d9298465193 100644 (file)
@@ -238,6 +238,9 @@ foreach (array("adminer", "editor") as $project) {
                                $file = preg_replace("((\t*)" . preg_quote('if (support("' . $feature . '")') . ".*\n\\1\\})sU", '', $file);
                        }
                }
+               if (count($drivers) == 1) {
+                       $file = str_replace('<?php echo html_select("driver", $drivers, DRIVER); ?>', "<input type='hidden' name='driver' value='$driver'>" . reset($drivers), $file);
+               }
        }
        $file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
        $file = preg_replace_callback('~\\b(include|require) "([^"]*\\$LANG.inc.php)";~', 'put_file_lang', $file);