Set default_db_ports higher up so it can be used to set the correct default if the admin does not select one.

This commit is contained in:
Miles Lott 2003-12-22 02:59:09 +00:00
parent 53352e87eb
commit 5105209379

View File

@ -31,6 +31,13 @@
{ {
} }
$default_db_ports = array(
'pgsql' => 5432,
'mysql' => 3306,
'mssql' => 1433,
'oracle' => 1521
);
function check_form_values() function check_form_values()
{ {
$errors = ''; $errors = '';
@ -213,7 +220,6 @@
$detected .= '<tr class="th"><td colspan="2">' . lang('Analysis') . '</td></tr><tr><td colspan="2">'. "\n"; $detected .= '<tr class="th"><td colspan="2">' . lang('Analysis') . '</td></tr><tr><td colspan="2">'. "\n";
$supported_db = array(); $supported_db = array();
$default_db_ports = array();
if(extension_loaded('mysql') || function_exists('mysql_connect')) if(extension_loaded('mysql') || function_exists('mysql_connect'))
{ {
$detected .= lang('You appear to have MySQL support enabled') . '<br>' . "\n"; $detected .= lang('You appear to have MySQL support enabled') . '<br>' . "\n";
@ -228,7 +234,6 @@
{ {
$detected .= lang('You appear to have PostgreSQL support enabled') . '<br>' . "\n"; $detected .= lang('You appear to have PostgreSQL support enabled') . '<br>' . "\n";
$supported_db[] = 'pgsql'; $supported_db[] = 'pgsql';
$default_db_ports['pgsql'] = '5432';
} }
else else
{ {
@ -238,7 +243,6 @@
{ {
$detected .= lang('You appear to have Microsoft SQL Server support enabled') . '<br>' . "\n"; $detected .= lang('You appear to have Microsoft SQL Server support enabled') . '<br>' . "\n";
$supported_db[] = 'mssql'; $supported_db[] = 'mssql';
$default_db_ports['mssql'] = '1433';
} }
else else
{ {
@ -248,7 +252,6 @@
{ {
$detected .= lang('You appear to have Oracle V8 (OCI) support enabled') . '<br>' . "\n"; $detected .= lang('You appear to have Oracle V8 (OCI) support enabled') . '<br>' . "\n";
$supported_db[] = 'oracle'; $supported_db[] = 'oracle';
$default_db_ports['oracle'] = '1521';
} }
else else
{ {
@ -256,7 +259,6 @@
{ {
$detected .= lang('You appear to have Oracle support enabled') . '<br>' . "\n"; $detected .= lang('You appear to have Oracle support enabled') . '<br>' . "\n";
$supported_db[] = 'oracle'; $supported_db[] = 'oracle';
$default_db_ports['oracle'] = '1521';
} }
else else
{ {