Save the variables when the hostname is not set or when the hostname matches the current server.

This commit is contained in:
Mark Crane
2015-03-25 23:50:48 +00:00
parent 6734ee23c9
commit db7f701d01

View File

@@ -1615,7 +1615,11 @@ function save_var_xml() {
$xml .= "<!-- ".base64_decode($row['var_description'])." -->\n";
}
}
$xml .= "<X-PRE-PROCESS cmd=\"set\" data=\"".$row['var_name']."=".$row['var_value']."\"/>\n";
if (strlen($row['var_hostname']) == 0) {
$xml .= "<X-PRE-PROCESS cmd=\"set\" data=\"".$row['var_name']."=".$row['var_value']."\"/>\n";
} elseif ($row['var_hostname'] == system('hostname')) {
$xml .= "<X-PRE-PROCESS cmd=\"set\" data=\"".$row['var_name']."=".$row['var_value']."\"/>\n";
}
}
$prev_var_cat = $row['var_cat'];
}