From 0d9ba8ab75c49bdbda3174ddab65d6d0f37e10f5 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Fri, 24 May 2013 10:49:18 +0000 Subject: [PATCH] Use the domain_name to find the domain_uuid for http/https provsioning. --- app/provision/index.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/provision/index.php b/app/provision/index.php index 489ae4bb83..00a7c030a6 100644 --- a/app/provision/index.php +++ b/app/provision/index.php @@ -32,6 +32,20 @@ require_once "includes/require.php"; $tmp_array = ''; $device_template = ''; +//get the domain_uuid + //get the domain + $domain_array = explode(":", $_SERVER["HTTP_HOST"]); + //get the domain_uuid + $sql = "select * from v_domains "; + $sql .= "where domain_name = '".$_SESSION['domain_name']."' "; + $prep_statement = $db->prepare($sql); + $prep_statement->execute(); + $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); + foreach($result as $row) { + $_SESSION["domain_uuid"] = $row["domain_uuid"]; + } + unset($result, $prep_statement); + //if password was defined in the system -> variables page then require the password. if (strlen($_SESSION['provision']['password']['var']) > 0) { //deny access if the password doesn't match