Add an alternative method to get the device vendor.

This commit is contained in:
FusionPBX 2022-07-19 09:52:34 -06:00 committed by GitHub
parent 2de1abb657
commit 3eb258c7ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -526,8 +526,14 @@
//use the mac address to get the vendor
if (strlen($device_vendor) == 0) {
$template_array = explode("/", $device_template);
//get the device vendor using the mac address
$device_vendor = device::get_vendor($device_mac_address);
//if the vendor was not found using the mac address use an alternative method
if (strlen($device_vendor) == 0) {
$template_array = explode("/", $device_template);
$device_vendor = $template_array[0];
}
}
//set the sub array index