X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Fdb%2Fmaintenance_db.inc;h=056a6209dd9e8e027e73276b90c8427da07c2044;hb=9bb7d0742be8a96fe8152c338998bbd5b6daa0be;hp=5ce47443dd6e23ca7f1401eb042734be013c461b;hpb=ff52c8193fbfd4c616599d360c2f062a38e18bc6;p=fa-stable.git diff --git a/admin/db/maintenance_db.inc b/admin/db/maintenance_db.inc index 5ce47443..056a6209 100644 --- a/admin/db/maintenance_db.inc +++ b/admin/db/maintenance_db.inc @@ -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)); @@ -327,7 +328,7 @@ function db_import($filename, $connection, $force=true) } } - +/* { // for debugging purposes global $path_to_root; $f = fopen($path_to_root.'/tmp/dbimport.txt', 'w+'); @@ -336,7 +337,7 @@ function db_import($filename, $connection, $force=true) fwrite($f, print_r($data_queries,true)); fclose($f); } - +*/ // execute drop tables if exists queries if (is_array($drop_queries)) {