From: Janusz Dobrowolski Date: Sat, 17 Apr 2010 19:53:02 +0000 (+0000) Subject: Small fix in company creation. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=2d214d3d601a2dad370fd3bed0746a1466ebe95c;p=textcart.git Small fix in company creation. --- diff --git a/admin/create_coy.php b/admin/create_coy.php index 672a0c1..7e3dcf3 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -87,12 +87,12 @@ function handle_submit() global $db_connections, $def_coy, $tb_pref_counter, $db, $comp_path, $comp_subdirs, $path_to_root; - $new = false; $error = false; if (!check_data()) return false; $id = $_GET['id']; + $new = !isset($db_connections[$id]); $db_connections[$id]['name'] = $_POST['name']; $db_connections[$id]['host'] = $_POST['host']; @@ -105,7 +105,6 @@ function handle_submit() { $db_connections[$id]['tbpref'] = $_POST['tbpref'] == 1 ? $tb_pref_counter."_" : ''; - $new = true; } else if ($_POST['tbpref'] != "") $db_connections[$id]['tbpref'] = $_POST['tbpref'];