]> git.joonet.de Git - adminer.git/commitdiff
Fix collations display
authorJakub Vrana <jakub@vrana.cz>
Wed, 12 May 2010 12:42:29 +0000 (14:42 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 12 May 2010 15:32:25 +0000 (17:32 +0200)
adminer/database.inc.php
adminer/drivers/mysql.inc.php

index 1ce45531d68ec50ff2bcf178a9a11634033089fa..6800d0e51b6d48254cbde3de2cb3bb393cd03ceb 100644 (file)
@@ -57,10 +57,7 @@ if ($_POST) {
 echo ($_POST["add_x"] || strpos($name, "\n")
        ? '<textarea name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
        : '<input name="name" value="' . h($name) . '" maxlength="64">'
-) . "\n";
-if ($collations) {
-       html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $collate);
-}
+) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $collate) : "");
 ?>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 <input type="submit" value="<?php echo lang('Save'); ?>">
index 900faa2d2a2c60f03df65a03d16c1c73f96652fb..c59e51000787afa2423716f867f958a9ee0b91d9 100644 (file)
@@ -514,6 +514,7 @@ if (!defined("DRIVER")) {
        * @return string
        */
        function create_database($db, $collation) {
+               global $connection;
                set_session("databases", null);
                return queries("CREATE DATABASE " . idf_escape($db) . ($collation ? " COLLATE " . $connection->quote($collation) : ""));
        }