Fix collations display

This commit is contained in:
Jakub Vrana 2010-05-12 14:42:29 +02:00
parent edf88e674c
commit b4eea5f671
2 changed files with 2 additions and 4 deletions

View 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'); ?>">

View 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) : ""));
}