Fixed key_in_foreign_table helper (problems with non-numeric keys).
[fa-stable.git] / admin / db / maintenance_db.inc
index 4c1c623d1164ab867169a32603dd26b0425266dd..056a6209dd9e8e027e73276b90c8427da07c2044 100644 (file)
@@ -253,7 +253,9 @@ function write_lang()
 
 function db_import($filename, $connection, $force=true)
 {
-       global $db, $go_debug;
+       global $db, $go_debug, $sql_trail;
+
+       $sql_trail = false;
 
        $allowed_commands = array(
                "create"  => 'table_queries', 
@@ -301,8 +303,7 @@ function db_import($filename, $connection, $force=true)
                {       // check if line begins with one of allowed queries
                        foreach($allowed_commands as $cmd => $table) 
                        {
-//                             if (strtolower(substr($line, 0, strlen($cmd))) == $cmd) 
-                               if (stripos($line, $cmd) === 0) 
+                               if (strtolower(substr($line, 0, strlen($cmd))) == $cmd) 
                                {
                                        if ($cmd == 'delimiter') {
                                                $delimiter = trim(substr($line, 10));