From 2d382bb4763033fd8b999bdf472aa97d3f98f40f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 7 May 2015 18:53:32 -0400 Subject: Set DB_PORT constant from DATABASE_URL env variable --- app/common.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app/common.php') diff --git a/app/common.php b/app/common.php index a434a73f..93e56816 100644 --- a/app/common.php +++ b/app/common.php @@ -11,6 +11,7 @@ if (getenv('DATABASE_URL')) { define('DB_USERNAME', $dbopts["user"]); define('DB_PASSWORD', $dbopts["pass"]); define('DB_HOSTNAME', $dbopts["host"]); + define('DB_PORT', isset($dbopts["port"]) ? $dbopts["port"] : null; define('DB_NAME', ltrim($dbopts["path"],'/')); } -- cgit v1.2.3