port 2.11.7.1 fix

This commit is contained in:
Marc Delisle
2008-07-15 19:03:11 +00:00
parent 6a707344eb
commit 62461e5477
8 changed files with 26 additions and 21 deletions

View File

@@ -12,7 +12,7 @@ require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'functions.js';
require_once './libraries/mysql_charsets.lib.php';
PMA_checkParameters(array('db'));
PMA_checkParameters(array('new_db'));
/**
* Defines the url to return to in case of error in a sql statement
@@ -22,7 +22,7 @@ $err_url = 'main.php?' . PMA_generate_common_url();
/**
* Builds and executes the db creation sql query
*/
$sql_query = 'CREATE DATABASE ' . PMA_backquote($db);
$sql_query = 'CREATE DATABASE ' . PMA_backquote($new_db);
if (!empty($db_collation)) {
list($db_charset) = explode('_', $db_collation);
if (in_array($db_charset, $mysql_charsets) && in_array($db_collation, $mysql_collations[$db_charset])) {
@@ -43,7 +43,8 @@ if (! $result) {
require_once './main.php';
} else {
$message = PMA_Message::success('strDatabaseHasBeenCreated');
$message->addParam($db);
$message->addParam($new_db);
$GLOBALS['db'] = $new_db;
require_once './libraries/header.inc.php';
require_once './' . $cfg['DefaultTabDatabase'];