Test fix for #275

This commit is contained in:
Paul Gear
2014-07-17 22:11:27 +10:00
parent cbfd365a28
commit 7709b43628
+6
View File
@@ -83,6 +83,9 @@
$poll_device['sysLocation'] = str_replace("\"","", $poll_device['sysLocation']);
// Remove leading & trailing backslashes added by VyOS/Vyatta/EdgeOS
$poll_device['sysLocation'] = trim($poll_device['sysLocation'], "\\");
// Rewrite sysLocation if there is a mapping array (database too?)
if (!empty($poll_device['sysLocation']) && is_array($config['location_map']))
{
@@ -91,6 +94,9 @@
$poll_device['sysContact'] = str_replace("\"","", $poll_device['sysContact']);
// Remove leading & trailing backslashes added by VyOS/Vyatta/EdgeOS
$poll_device['sysContact'] = trim($poll_device['sysContact'], "\\");
if ($poll_device['sysLocation'] == "not set")
{
$poll_device['sysLocation'] = "";