From e9415fd26cb87438095d09e4fbf59f4523d8c153 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Thu, 14 Apr 2016 23:05:05 -0600 Subject: [PATCH] Missed two of the $db connections. --- resources/switch.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/resources/switch.php b/resources/switch.php index a6ebeef482..50e3a770ff 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -449,7 +449,13 @@ function save_gateway_xml() { } function save_module_xml() { - global $config, $db, $domain_uuid; + global $config, $domain_uuid; + + //get the database connection + require_once "resources/classes/database.php"; + $database = new database; + $database->connect(); + $db = $database->db; $xml = ""; $xml .= "\n"; @@ -487,7 +493,13 @@ function save_module_xml() { } function save_var_xml() { - global $config, $db, $domain_uuid; + global $config, $domain_uuid; + + //get the database connection + require_once "resources/classes/database.php"; + $database = new database; + $database->connect(); + $db = $database->db; //open the vars.xml file $fout = fopen($_SESSION['switch']['conf']['dir']."/vars.xml","w");