From c7c31a308cda0b9b86c94500004c5981e7005be9 Mon Sep 17 00:00:00 2001 From: danielmaya Date: Thu, 18 Jan 2018 13:44:38 +0100 Subject: [PATCH] Changed explode in wizard snmp interface explorer --- .../agent_wizard.snmp_interfaces_explorer.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php index a3362aaa22..6066c284e1 100644 --- a/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.snmp_interfaces_explorer.php @@ -96,7 +96,7 @@ if ($snmpwalk) { // We get here only the interface part of the MIB, not full mib foreach($snmpis as $key => $snmp) { - $data = explode(': ',$snmp); + $data = explode (': ',$snmp, 2); $keydata = explode('::',$key); $keydata2 = explode('.',$keydata[1]); @@ -106,16 +106,8 @@ if ($snmpwalk) { } if (array_key_exists(1,$data)) { - // Fixed for switch dell powerconnect - if(count($data) > 2) { - $interfaces[$keydata2[1]][$keydata2[0]]['type'] = $data[0]; - unset($data[0]); - $interfaces[$keydata2[1]][$keydata2[0]]['value'] = implode(": ",$data); - } else { - $interfaces[$keydata2[1]][$keydata2[0]]['type'] = $data[0]; - $interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[1]; - } - + $interfaces[$keydata2[1]][$keydata2[0]]['type'] = $data[0]; + $interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[1]; } else { $interfaces[$keydata2[1]][$keydata2[0]]['type'] = ''; $interfaces[$keydata2[1]][$keydata2[0]]['value'] = $data[0];