Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b8ab2d4bfe
@ -16,20 +16,6 @@ if (! PMA_DRIZZLE) {
|
||||
}
|
||||
require 'libraries/build_html_for_db.lib.php';
|
||||
|
||||
/**
|
||||
* Sets globals from $_POST
|
||||
*/
|
||||
$post_params = array(
|
||||
'new_db'
|
||||
);
|
||||
foreach ($post_params as $one_post_param) {
|
||||
if (isset($_POST[$one_post_param])) {
|
||||
$GLOBALS[$one_post_param] = $_POST[$one_post_param];
|
||||
}
|
||||
}
|
||||
|
||||
PMA_Util::checkParameters(array('new_db'));
|
||||
|
||||
/**
|
||||
* Defines the url to return to in case of error in a sql statement
|
||||
*/
|
||||
@ -38,7 +24,7 @@ $err_url = 'index.php?' . PMA_generate_common_url();
|
||||
/**
|
||||
* Builds and executes the db creation sql query
|
||||
*/
|
||||
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($new_db);
|
||||
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($_POST['new_db']);
|
||||
if (! empty($_POST['db_collation'])) {
|
||||
list($db_charset) = explode('_', $_POST['db_collation']);
|
||||
if (in_array($db_charset, $mysql_charsets)
|
||||
@ -72,8 +58,8 @@ if (! $result) {
|
||||
}
|
||||
} else {
|
||||
$message = PMA_Message::success(__('Database %1$s has been created.'));
|
||||
$message->addParam($new_db);
|
||||
$GLOBALS['db'] = $new_db;
|
||||
$message->addParam($_POST['new_db']);
|
||||
$GLOBALS['db'] = $_POST['new_db'];
|
||||
|
||||
/**
|
||||
* If in an Ajax request, build the output and send it
|
||||
@ -89,11 +75,11 @@ if (! $result) {
|
||||
* @global array $GLOBALS['db_url_params']
|
||||
* @name $db_url_params
|
||||
*/
|
||||
$db_url_params['db'] = $new_db;
|
||||
$db_url_params['db'] = $_POST['new_db'];
|
||||
|
||||
$is_superuser = $GLOBALS['dbi']->isSuperuser();
|
||||
$column_order = PMA_getColumnOrder();
|
||||
$url_query = PMA_generate_common_url($new_db);
|
||||
$url_query = PMA_generate_common_url($_POST['new_db']);
|
||||
|
||||
/**
|
||||
* String that will contain the output HTML
|
||||
@ -108,7 +94,7 @@ if (! $result) {
|
||||
// $dbstats comes from the create table dialog
|
||||
if (! empty($dbstats)) {
|
||||
$current = array(
|
||||
'SCHEMA_NAME' => $new_db,
|
||||
'SCHEMA_NAME' => $_POST['new_db'],
|
||||
'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax,
|
||||
'SCHEMA_TABLES' => '0',
|
||||
'SCHEMA_TABLE_ROWS' => '0',
|
||||
@ -120,7 +106,7 @@ if (! $result) {
|
||||
);
|
||||
} else {
|
||||
$current = array(
|
||||
'SCHEMA_NAME' => $new_db
|
||||
'SCHEMA_NAME' => $_POST['new_db']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user