Update provision.php
This commit is contained in:
parent
fe7ab98342
commit
ab0f3b4ae5
|
|
@ -28,6 +28,7 @@ include "root.php";
|
||||||
|
|
||||||
//define the provision class
|
//define the provision class
|
||||||
class provision {
|
class provision {
|
||||||
|
|
||||||
public $domain_uuid;
|
public $domain_uuid;
|
||||||
public $domain_name;
|
public $domain_name;
|
||||||
public $template_dir;
|
public $template_dir;
|
||||||
|
|
@ -110,7 +111,12 @@ include "root.php";
|
||||||
$parameters['mac'] = $mac;
|
$parameters['mac'] = $mac;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$num_rows = $database->select($sql, $parameters, 'column');
|
$num_rows = $database->select($sql, $parameters, 'column');
|
||||||
return $num_rows > 0 ? true : false;
|
if ($num_rows > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
unset($sql, $parameters, $num_rows);
|
unset($sql, $parameters, $num_rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,7 +178,12 @@ include "root.php";
|
||||||
|
|
||||||
//define a function to check if a contact exists in the contacts array
|
//define a function to check if a contact exists in the contacts array
|
||||||
private function contact_exists($contacts, $uuid) {
|
private function contact_exists($contacts, $uuid) {
|
||||||
return is_array($contacts[$uuid]) ? true : false;
|
if (is_array($contacts[$uuid])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function contact_append(&$contacts, &$line, $domain_uuid, $device_user_uuid, $is_group) {
|
private function contact_append(&$contacts, &$line, $domain_uuid, $device_user_uuid, $is_group) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue