Skip to content

Commit

Permalink
Directly use the POST parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed Jun 15, 2013
1 parent cb1ee1e commit 49cd551
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions db_create.php
Expand Up @@ -20,7 +20,6 @@
* Sets globals from $_POST
*/
$post_params = array(
'db_collation',
'new_db'
);
foreach ($post_params as $one_post_param) {
Expand All @@ -40,15 +39,16 @@
* Builds and executes the db creation sql query
*/
$sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($new_db);
if (! empty($db_collation)) {
list($db_charset) = explode('_', $db_collation);
if (! empty($_POST['db_collation'])) {
list($db_charset) = explode('_', $_POST['db_collation']);
if (in_array($db_charset, $mysql_charsets)
&& in_array($db_collation, $mysql_collations[$db_charset])
&& in_array($_POST['db_collation'], $mysql_collations[$db_charset])
) {
$sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($db_collation);
$sql_query .= ' DEFAULT'
. PMA_generateCharsetQueryPart($_POST['db_collation']);
}
$db_collation_for_ajax = $db_collation;
unset($db_charset, $db_collation);
$db_collation_for_ajax = $_POST['db_collation'];
unset($db_charset);
}
$sql_query .= ';';

Expand Down

0 comments on commit 49cd551

Please sign in to comment.