Added an extra parameter to db_export in maintenance_db.inc for new COAs
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 4 Aug 2010 10:59:56 +0000 (10:59 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 4 Aug 2010 10:59:56 +0000 (10:59 +0000)
Link error in items.php for Pictures

CHANGELOG.txt
admin/db/maintenance_db.inc
inventory/manage/items.php
version.php

index ea20c5436a034cbaa6ef52f67b493d3757ca2354..18f4517629a3cd57a0f294c9181651230891ac50 100644 (file)
@@ -19,6 +19,12 @@ Legend:
 ! -> Note
 $ -> Affected files
 
+04-Aug-2010 Joe Hung
++ Added an extra parameter to db_export in maintenance_db.inc for new COAs
+$ /admin/db/maintenance_db.inc
+# Link error in items.php for Pictures
+$ /inventory/manage/items.php
+
 01-Aug-2010 Joe Hunt
 + Added Email link when updating documents.
 $ /sales/credit_note_entry.php
index f1acc83aea6ec1477ce1bbfb4cab64ce6ed71040..ed14e56a1de1e438b9eef8eee6cf1baaca07fb0c 100644 (file)
@@ -482,7 +482,7 @@ function db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF)
 
 // generates a dump of $db database
 // $drop and $zip tell if to include the drop table statement or dry to pack
-function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF)
+function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false)
 {
 
        global $app_title, $version, $power_url, $path_to_root;
@@ -573,6 +573,8 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF)
                        $out.="### Structure of table `".$tablename."` ###\n\n";
 
                        $out.="DROP TABLE IF EXISTS `".$tablename."`;\n\n";
+                       if ($no_default && ($def_pos = strpos($table_sql[$tablename], "DEFAULT CHARSET")) > 0)
+                               $table_sql[$tablename] = substr($table_sql[$tablename], 0, $def_pos);
                        $out.=$table_sql[$tablename];
 
                        // add auto_increment value
index 0793bb38a82c9d630965215d01d2ead3c770e356..fad6fc54867f916dd6f915b5907e9e417f8112fa 100644 (file)
@@ -393,7 +393,7 @@ if (isset($_POST['NewStockID']) && file_exists(company_path().'/images/'
 {
  // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
        $stock_img_link .= "<img id='item_img' alt = '[".$_POST['NewStockID'].".jpg".
-               "]' src='".company_path().'images/'.item_img_name($_POST['NewStockID']).
+               "]' src='".company_path().'/images/'.item_img_name($_POST['NewStockID']).
                ".jpg?nocache=".rand()."'"." height='$pic_height' border='0'>";
        $check_remove_image = true;
 } 
index 73ae4b36f8b11b42fd1dbccbb796c999b2888e00..7f2a9fc475a512c65436de33553c2679434c5b65 100644 (file)
@@ -5,7 +5,7 @@
 //
 
 // Internal data-source version compatibility check. Do not change.
-$core_version = "2.3rc";
+$core_version = "2.3RC1";
 
 // application version - can be set also in config.php
 if (!isset($version))