From db7f701d018ba558d2a0c0b5f71ae5456769e3f2 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 25 Mar 2015 23:50:48 +0000 Subject: [PATCH] Save the variables when the hostname is not set or when the hostname matches the current server. --- resources/switch.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/switch.php b/resources/switch.php index 328488181d..7f20872259 100644 --- a/resources/switch.php +++ b/resources/switch.php @@ -1615,7 +1615,11 @@ function save_var_xml() { $xml .= "\n"; } } - $xml .= "\n"; + if (strlen($row['var_hostname']) == 0) { + $xml .= "\n"; + } elseif ($row['var_hostname'] == system('hostname')) { + $xml .= "\n"; + } } $prev_var_cat = $row['var_cat']; }