瀏覽代碼

Fixed bug where setup stored hard coded config to config file

Lukas Metzger 7 年之前
父節點
當前提交
de80e3797b
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      backend/src/controllers/Setup.php

+ 5 - 4
backend/src/controllers/Setup.php

@@ -91,10 +91,11 @@ class Setup
             // Save config file
             $config = [
                 'db' => [
-                    'host' => 'mysql.dmz.intranet',
-                    'user' => 'pdnsnew',
-                    'password' => 'pdnsnew',
-                    'dbname' => 'pdnsnew'
+                    'host' => $db['host'],
+                    'user' => $db['user'],
+                    'password' => $db['password'],
+                    'dbname' => $db['database'],
+                    'port' => intval($db['port'])
                 ]
             ];
             $configFile = '<?php' . "\n\n" . 'return ' . var_export($config, true) . ';';