From: Joe Hunt Date: Thu, 8 Apr 2010 22:14:04 +0000 (+0000) Subject: Creating a new company without a Database script causes unpredictable errors X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=d4b0072b8c89fe05df7358a1c90082e80581d98b;p=textcart.git Creating a new company without a Database script causes unpredictable errors --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0412a84..86433b4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +09-Apr-2010 Joe Hunt +# Creating a new company without a Database script causes unpredictable errors. +$ /admin/create_coy.php + 06-Apr-2010 Joe Hunt/Albin # Inactive items should not show in Price List Report. In Item lists they are stamped (Inactive) after the description. diff --git a/admin/create_coy.php b/admin/create_coy.php index 0a39697..a0d4c61 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -42,6 +42,11 @@ function check_data() if ($_POST['name'] == "" || $_POST['host'] == "" || $_POST['dbuser'] == "" || $_POST['dbname'] == "") return false; + if ($selected_id == -1 && (!isset($_GET['ul']) || $_GET['ul'] != 1)) + { + display_error(_("When creating a new company, you must provide a Database script file.")); + return false; + } foreach($db_connections as $id=>$con) { if($id != $selected_id && $_POST['host'] == $con['host']