Better Model detection of Old 3Com devices (#10660)

This commit is contained in:
joseUPV
2019-10-09 02:11:12 +02:00
committed by Tony Murray
parent 6cca8c6e6f
commit ca281ec12a

View File

@@ -1,4 +1,10 @@
<?php
// Version is the last word in the sysDescr's first line
list($version) = explode("\r", substr($device['sysDescr'], (strpos($device['sysDescr'], 'Release') + 8)));
if (strpos($device['sysDescr'], 'Software')) {
$hardware = str_replace("3Com ", '', substr($device['sysDescr'], 0, strpos($device['sysDescr'], 'Software')));
// Version is the last word in the sysDescr's first line
list($version) = explode("\n", substr($device['sysDescr'], (strpos($device['sysDescr'], 'Version') + 8)));
} else {
$hardware = str_replace("3Com ", '', $device['sysDescr']);
$version='';
}