Improved the way the import destination is decided upon.
This commit is contained in:
@@ -262,13 +262,14 @@ for ($i = 0; $i < $len; ++$i) {
|
||||
/* Set database name to the currently selected one, if applicable */
|
||||
if (strlen($db)) {
|
||||
$db_name = $db;
|
||||
$options = array('create_db' => false);
|
||||
} else {
|
||||
$db_name = 'ODS_DB';
|
||||
$options = NULL;
|
||||
}
|
||||
|
||||
/* Non-applicable parameters */
|
||||
$create = NULL;
|
||||
$options = NULL;
|
||||
|
||||
/* Created and execute necessary SQL statements from data */
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
|
@@ -278,11 +278,22 @@ if ($data_present) {
|
||||
* array $options = an associative array of options
|
||||
*/
|
||||
|
||||
/* Set database name to the currently selected one, if applicable */
|
||||
if (strlen($db)) {
|
||||
/* Override the database name in the XML file, if one is selected */
|
||||
$db_name = $db;
|
||||
$options = array('create_db' => false);
|
||||
} else {
|
||||
if ($db_name === NULL) {
|
||||
$db_name = 'XML_DB';
|
||||
}
|
||||
|
||||
/* Set database collation/charset */
|
||||
$options = array(
|
||||
'db_collation' => $collation,
|
||||
'db_charset' => $charset,
|
||||
);
|
||||
}
|
||||
|
||||
/* Created and execute necessary SQL statements from data */
|
||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||
|
Reference in New Issue
Block a user