diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b37b757098..8f4448bb5e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-04-30 Sergio Martin + + * operation/snmpconsole/snmp_view.php: Improved the + code using printTruncateText + 2010-04-30 Sergio Martin * include/functions_ui.php: Improved the printTruncateText diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index c65326b352..daeb8fb2df 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -356,24 +356,19 @@ if ($traps !== false) { } } - //Value - $data[3] = substr ($trap["value"], 0, 15); - - if (empty ($data[3])) { + //Value + if (empty ($trap["value"])) { $data[3] = __('N/A'); - } elseif (strlen ($trap["value"]) > 15) { - $data[3] = ''.$data[3].'...'; + } else { + $data[3] = printTruncateText($trap["value"], 15, false); } - //Custom - //$data[4] = '' . $trap["value_custom"] . ''; - $data[4] = substr ($trap["value_custom"], 0, 15); - - if (empty ($data[4])) { + //Custom + if (empty ($trap["value_custom"])) { $data[4] = __('N/A'); - } elseif (strlen ($trap["value_custom"]) > 15) { - $data[4] = ''.$data[4].'...'; - } + } else { + $data[4] = printTruncateText($trap["value_custom"], 15, false); + } //User if (!empty ($trap["status"])) {