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 */
|
/* Set database name to the currently selected one, if applicable */
|
||||||
if (strlen($db)) {
|
if (strlen($db)) {
|
||||||
$db_name = $db;
|
$db_name = $db;
|
||||||
|
$options = array('create_db' => false);
|
||||||
} else {
|
} else {
|
||||||
$db_name = 'ODS_DB';
|
$db_name = 'ODS_DB';
|
||||||
|
$options = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Non-applicable parameters */
|
/* Non-applicable parameters */
|
||||||
$create = NULL;
|
$create = NULL;
|
||||||
$options = NULL;
|
|
||||||
|
|
||||||
/* Created and execute necessary SQL statements from data */
|
/* Created and execute necessary SQL statements from data */
|
||||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||||
|
@@ -278,11 +278,22 @@ if ($data_present) {
|
|||||||
* array $options = an associative array of options
|
* 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 */
|
/* Set database collation/charset */
|
||||||
$options = array(
|
$options = array(
|
||||||
'db_collation' => $collation,
|
'db_collation' => $collation,
|
||||||
'db_charset' => $charset,
|
'db_charset' => $charset,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/* Created and execute necessary SQL statements from data */
|
/* Created and execute necessary SQL statements from data */
|
||||||
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
PMA_buildSQL($db_name, $tables, $analyses, $create, $options);
|
||||||
|
Reference in New Issue
Block a user