From c8a731931e76f7a2d52a40ed1000f43b3ef4ea5b Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sun, 3 Dec 2017 12:39:25 -0700 Subject: [PATCH] Update provision.php --- app/provision/resources/classes/provision.php | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/provision/resources/classes/provision.php b/app/provision/resources/classes/provision.php index 74ef06fbf4..caccbb8a31 100644 --- a/app/provision/resources/classes/provision.php +++ b/app/provision/resources/classes/provision.php @@ -176,16 +176,6 @@ include "root.php"; return $mac; } - //define a function to check if a contact exists in the contacts array - private function contact_exists($contacts, $uuid) { - if (is_array($contacts[$uuid])) { - return true; - } - else { - return false; - } - } - //send http error private function http_error($error) { if ($error === "404") { @@ -201,6 +191,16 @@ include "root.php"; exit(); } + //define a function to check if a contact exists in the contacts array + private function contact_exists($contacts, $uuid) { + if (is_array($contacts[$uuid])) { + return true; + } + else { + return false; + } + } + private function contact_append(&$contacts, &$line, $domain_uuid, $device_user_uuid, $is_group){ $sql = "select c.contact_uuid, c.contact_organization, c.contact_name_given, c.contact_name_family, "; $sql .= "c.contact_type, c.contact_category, p.phone_label,"; @@ -529,7 +529,9 @@ include "root.php"; if ($_SESSION['provision']['debug']['boolean'] == 'true'){ echo "
device disabled
"; } - $this->http_error('404'); + else { + $this->http_error('404'); + } exit; }