summaryrefslogtreecommitdiff
path: root/app/common.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-07 18:53:32 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-07 18:53:32 -0400
commit2d382bb4763033fd8b999bdf472aa97d3f98f40f (patch)
tree0bceaa11f5270a502b2f90ced9277b12b0e4d210 /app/common.php
parent26b1caa352377e67b1b13d41bcf40e1f17598665 (diff)
Set DB_PORT constant from DATABASE_URL env variable
Diffstat (limited to 'app/common.php')
-rw-r--r--app/common.php1
1 files changed, 1 insertions, 0 deletions
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"],'/'));
}