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:
@@ -11,9 +11,6 @@
|
||||
class ApplicationAPI extends Application
|
||||
{
|
||||
|
||||
private $gDatabase;
|
||||
|
||||
|
||||
private $AdminID;
|
||||
|
||||
|
||||
@@ -22,8 +19,6 @@ class ApplicationAPI extends Application
|
||||
|
||||
$this->AdminID = $AdminID;
|
||||
|
||||
$this->gDatabase = parent::instDB();
|
||||
|
||||
|
||||
if (!$this->ApiKeyExists($AdminID))
|
||||
{
|
||||
@@ -35,7 +30,7 @@ class ApplicationAPI extends Application
|
||||
{
|
||||
$AdminID = $this->AdminID;
|
||||
|
||||
$record = $this->gDatabase->row(
|
||||
$record = $this->db->row(
|
||||
"SELECT * FROM APIKeys WHERE AdminID = ?",
|
||||
$AdminID
|
||||
);
|
||||
|
Reference in New Issue
Block a user