From 510520937997d439e47432ab32d2a133e9ae145e Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Mon, 22 Dec 2003 02:59:09 +0000 Subject: [PATCH] Set default_db_ports higher up so it can be used to set the correct default if the admin does not select one. --- setup/manageheader.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup/manageheader.php b/setup/manageheader.php index fdd4783692..f669b0a331 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -31,6 +31,13 @@ { } + $default_db_ports = array( + 'pgsql' => 5432, + 'mysql' => 3306, + 'mssql' => 1433, + 'oracle' => 1521 + ); + function check_form_values() { $errors = ''; @@ -213,7 +220,6 @@ $detected .= '' . lang('Analysis') . ''. "\n"; $supported_db = array(); - $default_db_ports = array(); if(extension_loaded('mysql') || function_exists('mysql_connect')) { $detected .= lang('You appear to have MySQL support enabled') . '
' . "\n"; @@ -228,7 +234,6 @@ { $detected .= lang('You appear to have PostgreSQL support enabled') . '
' . "\n"; $supported_db[] = 'pgsql'; - $default_db_ports['pgsql'] = '5432'; } else { @@ -238,7 +243,6 @@ { $detected .= lang('You appear to have Microsoft SQL Server support enabled') . '
' . "\n"; $supported_db[] = 'mssql'; - $default_db_ports['mssql'] = '1433'; } else { @@ -248,7 +252,6 @@ { $detected .= lang('You appear to have Oracle V8 (OCI) support enabled') . '
' . "\n"; $supported_db[] = 'oracle'; - $default_db_ports['oracle'] = '1521'; } else { @@ -256,7 +259,6 @@ { $detected .= lang('You appear to have Oracle support enabled') . '
' . "\n"; $supported_db[] = 'oracle'; - $default_db_ports['oracle'] = '1521'; } else {