Update device_edit.php

Make the vendor name case insensitive.
This commit is contained in:
FusionPBX 2017-02-24 00:19:28 -07:00 committed by GitHub
parent 3f4683b4d5
commit a867f08ad8
1 changed files with 2 additions and 4 deletions

View File

@ -1073,19 +1073,17 @@
echo " <optgroup label='".ucwords($function['vendor_name'])."'>\n";
}
$selected = '';
if ($row['device_key_vendor'] == $function['vendor_name'] && $row['device_key_type'] == $function['value']) {
if (strtolower($row['device_key_vendor']) == $function['vendor_name'] && $row['device_key_type'] == $function['value']) {
$selected = "selected='selected'";
}
if (strlen($row['device_key_vendor']) == 0) {
echo " <option value='".$function['value']."' vendor='".$function['vendor_name']."' $selected >".$text['label-'.$function['name']]."</option>\n";
}
if (strlen($row['device_key_vendor']) > 0 && $row['device_key_vendor'] == $function['vendor_name']) {
if (strlen($row['device_key_vendor']) > 0 && strtolower($row['device_key_vendor']) == $function['vendor_name']) {
echo " <option value='".$function['value']."' vendor='".$function['vendor_name']."' $selected >".$text['label-'.$function['name']]."</option>\n";
}
$previous_vendor = $function['vendor_name'];
$i++;
}
if (strlen($row['device_key_vendor']) == 0) {
echo " </optgroup>\n";