Update provision.php
This commit is contained in:
parent
b1eeecf8cb
commit
56492fdca6
|
|
@ -115,14 +115,25 @@ include "root.php";
|
|||
$row = $prep_statement->fetch();
|
||||
$count = $row['count'];
|
||||
if ($row['count'] > 0) {
|
||||
return true;
|
||||
$mac_exists = true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
$mac_exists = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
$mac_exists = false;
|
||||
}
|
||||
if ($mac_exists) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
//log the invalid mac address attempt to the syslog server
|
||||
openlog("FusionPBX", LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] invalid mac address ".$mac);
|
||||
closelog();
|
||||
//invalid mac address return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue