From 7c11118e2b6e6eb58717e3954c159bc8b67659ba Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Tue, 19 Mar 2013 10:51:16 +1300 Subject: [PATCH] Allow setting the database port in _ss_environment --- conf/ConfigureFromEnv.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/ConfigureFromEnv.php b/conf/ConfigureFromEnv.php index ffa0beb99..dfbc99e3f 100644 --- a/conf/ConfigureFromEnv.php +++ b/conf/ConfigureFromEnv.php @@ -13,6 +13,7 @@ * - SS_DATABASE_SERVER: The database server to use, defaulting to localhost * - SS_DATABASE_USERNAME: The database username (mandatory) * - SS_DATABASE_PASSWORD: The database password (mandatory) + * - SS_DATABASE_PORT: The database port * - SS_DATABASE_SUFFIX: A suffix to add to the database name. * - SS_DATABASE_PREFIX: A prefix to add to the database name. * - SS_DATABASE_TIMEZONE: Set the database timezone to something other than the system timezone. @@ -95,6 +96,11 @@ if(defined('SS_DATABASE_USERNAME') && defined('SS_DATABASE_PASSWORD')) { . (defined('SS_DATABASE_SUFFIX') ? SS_DATABASE_SUFFIX : ''), ); + // Set the port if called for + if(defined('SS_DATABASE_PORT')) { + $databaseConfig['port'] = SS_DATABASE_PORT; + } + // Set the timezone if called for if (defined('SS_DATABASE_TIMEZONE')) { $databaseConfig['timezone'] = SS_DATABASE_TIMEZONE;