code cleanup; add a TODO about importing an XML export into a database different than the original one

This commit is contained in:
Marc Delisle
2009-12-29 15:11:06 +00:00
parent 7b3c21b599
commit f1f04a1b3b

View File

@@ -147,6 +147,10 @@ if (isset($namespaces['pma'])) {
foreach ($struct as $tier1 => $val1) { foreach ($struct as $tier1 => $val1) {
foreach($val1 as $tier2 => $val2) { foreach($val1 as $tier2 => $val2) {
/* Need to select the correct database for the creation of tables, views, triggers, etc. */ /* Need to select the correct database for the creation of tables, views, triggers, etc. */
/**
* @todo Generating a USE here blocks importing of a table
* into another database.
*/
$attrs = $val2->attributes(); $attrs = $val2->attributes();
$create[] = "USE " . PMA_backquote($attrs["name"]); $create[] = "USE " . PMA_backquote($attrs["name"]);
@@ -255,10 +259,8 @@ if ($data_present) {
* to maintain PMA_buildSQL() call integrity * to maintain PMA_buildSQL() call integrity
*/ */
if (! isset($analyses)) { if (! isset($analyses)) {
if ($struct_present) {
$analyses = NULL;
} else {
$analyses = NULL; $analyses = NULL;
if (! $struct_present) {
$create = NULL; $create = NULL;
} }
} }