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
+2 -4
View File
@@ -1073,19 +1073,17 @@
echo " <optgroup label='".ucwords($function['vendor_name'])."'>\n"; echo " <optgroup label='".ucwords($function['vendor_name'])."'>\n";
} }
$selected = ''; $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'"; $selected = "selected='selected'";
} }
if (strlen($row['device_key_vendor']) == 0) { if (strlen($row['device_key_vendor']) == 0) {
echo " <option value='".$function['value']."' vendor='".$function['vendor_name']."' $selected >".$text['label-'.$function['name']]."</option>\n"; 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"; echo " <option value='".$function['value']."' vendor='".$function['vendor_name']."' $selected >".$text['label-'.$function['name']]."</option>\n";
} }
$previous_vendor = $function['vendor_name']; $previous_vendor = $function['vendor_name'];
$i++; $i++;
} }
if (strlen($row['device_key_vendor']) == 0) { if (strlen($row['device_key_vendor']) == 0) {
echo " </optgroup>\n"; echo " </optgroup>\n";