Added support to retrofit tables without prefix

This commit is contained in:
stronk7 2006-09-05 17:55:59 +00:00
parent 415280bfc3
commit bc942ab58a

View File

@ -131,7 +131,10 @@ class new_table_from_mysql extends XMLDBAction {
$table = new XMLDBTable(strtolower(trim($tableparam)));
$table->setComment($table->getName() . ' table retrofitted from MySQL');
/// Get fields info from ADODb
$dbfields = $db->MetaColumns($CFG->prefix . $tableparam);
if(!$dbfields = $db->MetaColumns($CFG->prefix . $tableparam)) {
///Try it without prefix if doesn't exist
$dbfields = $db->MetaColumns($tableparam);
}
if ($dbfields) {
foreach ($dbfields as $dbfield) {
/// Create new XMLDB field