From 6b7513dcb099cac13f3ffff168bc97be037e441e Mon Sep 17 00:00:00 2001 From: markjcrane Date: Sat, 16 Apr 2016 00:27:24 -0600 Subject: [PATCH] Use the connect method in the constructor. --- app/scripts/resources/classes/scripts.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index fb737ef9c9..0fbed36a89 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -54,9 +54,7 @@ if (!class_exists('scripts')) { //connect to the database if not connected require_once "resources/classes/database.php"; $database = new database; - if (!$this->db) { - $database->connect(); - } + $database->connect(); $this->db = $database->db; $this->db_type = $database->type; $this->db_name = $database->db_name;