Change wrong DSN name for db wrapper and update config class

This commit changes how the config class gets it's values to a more solid way.
Additonally, the DSN was updated to use a correct format, allowing PDO to connect (With a wrong DSN, it tries to connect to something that doesn't exist).
This commit is contained in:
Miguel Nogueira
2018-06-08 18:58:48 +00:00
parent 9c9c10467d
commit c3f882960c
6 changed files with 46 additions and 95 deletions

View File

@@ -13,9 +13,9 @@ class VirtualminHandler
$Config = new Config();
$cConfigArray = $Config->getConfig();
$url = $cConfigArray['vmin-url'];
$username = $cConfigArray['username'];
$password = $cConfigArray['password'];
$url = $cConfigArray['virtualmin']['vmin-url'];
$username = $cConfigArray['virtualmin']['username'];
$password = $cConfigArray['virtualmin']['password'];
$this->virtualmin = new Virtualmin\VirtualServersClient($url, $username, $password);
}