Minor bugfix in db_import()
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 31 Jan 2008 18:20:04 +0000 (18:20 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Thu, 31 Jan 2008 18:20:04 +0000 (18:20 +0000)
CHANGELOG.txt
admin/db/maintenance_db.inc

index b208c0547e7caae46f26df1ad923de5fa3c54978..0b9f289d6617acd652e2870ee98c173982f00c40 100644 (file)
@@ -19,6 +19,10 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+31-Jan-2008 Janusz Dobrowolski
+ # Minor bugfix in db_import()
+ $ /admin/db/maintenance_db.inc
 30-Jan-2008 Janusz Dobrowolski
  # Minor display fix in tax_types.php
  $ /taxes/tax_types.php
index 0a710e34a409e032db4153bbaab5dc78fb12fba9..7520e359979d20759f852b120f471bdcd4ace52b 100644 (file)
@@ -160,8 +160,10 @@ function db_import($filename, $connection)
                {
 
                        // create sql query ending in this line
-                       if (strtolower(substr($line, 0, 1)) == ")")
+                       if (strtolower(substr($line, 0, 1)) == ")") {
                                $table = false;
+                               $line = substr($line,0,strlen($line)-1);
+                 }
                        $table_queries[count($table_queries) - 1] .= $line . "\n";
                }
        }