Update device_edit.php
Make the vendor name case insensitive.
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user