17-Jan-2011 Joe Hunt
# [0000494] Cannot set second company pref when setup System and General GL
$ /admin/db/company_db.inc
+# {0000481] No warning when user does not supply db credentials in create_coy
+$ /admin/create_coy.php
12-Jan-2011 Janusz Dobrowolski
+ Added access extensions hook method, cleanup
global $db_connections, $tb_pref_counter, $selected_id;
if ($_POST['name'] == "" || $_POST['host'] == "" || $_POST['dbuser'] == "" || $_POST['dbname'] == "")
- return false;
+ {
+ display_error(_("Database setting are not specified."));
+ return false;
+ }
foreach($db_connections as $id=>$con)
{
hidden('dbpassword', $_POST['dbpassword']);
}
else
+ {
$_POST['tbpref'] = $tb_pref_counter."_";
+ // Insert the current settings as default
+ $conn = $db_connections[user_company()];
+ $_POST['host'] = $conn['host'];
+ $_POST['dbuser'] = $conn['dbuser'];
+ $_POST['dbpassword'] = $conn['dbpassword'];
+ $_POST['dbname'] = $conn['dbname'];
+ }
text_row_ex(_("Company"), 'name', 30);
text_row_ex(_("Host"), 'host', 30, 60);
text_row_ex(_("Database User"), 'dbuser', 30);