Minor adjustments in function db_export on line 325
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Dec 2007 23:41:58 +0000 (23:41 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 30 Dec 2007 23:41:58 +0000 (23:41 +0000)
CHANGELOG.txt
admin/db/maintenance_db.inc

index 2c3c3559ebdbec6424806ff453be9f67bdd37605..d2ca9fba010e4669ce2c4bd63f60fbe0cca9ea93 100644 (file)
@@ -19,8 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+30-Dec-2007 Joe Hunt
+ # Minor adjustments in function db_export on line 325
+ $ /admin/db/maintenance_db.inc
 29-Dec-2007 Joe Hunt
- ! Added a variable, $print_invoice_no, in config.sys for printing the invoice number instead of invoice reference.
+ ! Added a variable, $print_invoice_no, in config.php for printing the invoice number instead of invoice reference.
  $ config.php
  
  # Fixed a bug when exporting database. Exported NULL field values from NO to empty field (from mysql version 5.0.32).
index 840b493b068232282b46ba44b0b10a5f11044a15..fdbd51bfc835aa4bad44400e63d47fb302d8db74 100644 (file)
@@ -321,7 +321,9 @@ function db_export($conn, $filename, $zip='no', $comment='')
     $all_tables = array();
     while($row = db_fetch($res))
     {
-               if ($conn["tbpref"] == "" || strpos($row['Name'], $conn["tbpref"]) !== false)
+               //if ($conn["tbpref"] == "" || strpos($row['Name'], $conn["tbpref"]) !== false) replaced
+               if (($conn["tbpref"] == "" && !preg_match('/[0-9]+_/', $row['Name'])) ||
+                       ($conn["tbpref"] != "" && strpos($row['Name'], $conn["tbpref"]) !== false))
                $all_tables[] = $row;
     }
         // get table structures