mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
trim processor descriptions
git-svn-id: http://www.observium.org/svn/observer/trunk@3072 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -414,7 +414,7 @@ function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $prec
|
||||
if ($debug) { echo("$device, $oid, $index, $type, $descr, $precision, $current, $entPhysicalIndex, $hrDeviceIndex\n"); }
|
||||
if ($descr)
|
||||
{
|
||||
$descr = str_replace("\"", "", $descr);
|
||||
$descr = trim(str_replace("\"", "", $descr));
|
||||
if (mysql_result(mysql_query("SELECT count(processor_id) FROM `processors` WHERE `processor_index` = '$index' AND `device_id` = '".$device['device_id']."' AND `processor_type` = '$type'"),0) == '0')
|
||||
{
|
||||
$query = "INSERT INTO processors (`entPhysicalIndex`, `hrDeviceIndex`, `device_id`, `processor_descr`, `processor_index`, `processor_oid`, `processor_usage`, `processor_type`, `processor_precision`)
|
||||
|
Reference in New Issue
Block a user