From 7709b4362818ce7bebc3e2f146fd254e757d4b16 Mon Sep 17 00:00:00 2001 From: Paul Gear Date: Thu, 17 Jul 2014 22:11:27 +1000 Subject: [PATCH] Test fix for #275 --- includes/polling/system.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/polling/system.inc.php b/includes/polling/system.inc.php index 669f4171be..4cf0c7754a 100755 --- a/includes/polling/system.inc.php +++ b/includes/polling/system.inc.php @@ -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'] = "";