From 47164c5c9cde2cb7054401f2d3766e17d992b3ab Mon Sep 17 00:00:00 2001 From: Laurent Pinsivy Date: Wed, 19 Jun 2019 14:57:51 +0100 Subject: [PATCH 1/2] fix(remote-server): update only properties of selected poller --- www/include/configuration/configServers/DB-Func.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/include/configuration/configServers/DB-Func.php b/www/include/configuration/configServers/DB-Func.php index bc2bd100ef2..dd5f046e107 100644 --- a/www/include/configuration/configServers/DB-Func.php +++ b/www/include/configuration/configServers/DB-Func.php @@ -516,7 +516,8 @@ function updateRemoteServerInformation(array $data) : $rq .= "http_port = NULL, "; $rq .= "no_check_certificate = '" . $data["no_check_certificate"]["no_check_certificate"] . "', "; $rq .= "no_proxy = '" . $data["no_proxy"]["no_proxy"] . "', "; - $rq .= "ip = '" . $data["ns_ip_address"] . "'"; + $rq .= "ip = '" . $data["ns_ip_address"] . "' "; + $rq .= "WHERE ip = '" . $data["ns_ip_address"] . "'"; $pearDB->query($rq); } $res->closeCursor(); From 2b3c2947bd0cb2948dacb3e51c3672d7c594d130 Mon Sep 17 00:00:00 2001 From: Laurent Pinsivy Date: Thu, 20 Jun 2019 09:17:59 +0100 Subject: [PATCH 2/2] fix(remote-server): remove useless SQL set params --- www/include/configuration/configServers/DB-Func.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/include/configuration/configServers/DB-Func.php b/www/include/configuration/configServers/DB-Func.php index dd5f046e107..8feca5474f3 100644 --- a/www/include/configuration/configServers/DB-Func.php +++ b/www/include/configuration/configServers/DB-Func.php @@ -515,8 +515,7 @@ function updateRemoteServerInformation(array $data) ? $rq .= "http_port = '" . $data["http_port"] . "', " : $rq .= "http_port = NULL, "; $rq .= "no_check_certificate = '" . $data["no_check_certificate"]["no_check_certificate"] . "', "; - $rq .= "no_proxy = '" . $data["no_proxy"]["no_proxy"] . "', "; - $rq .= "ip = '" . $data["ns_ip_address"] . "' "; + $rq .= "no_proxy = '" . $data["no_proxy"]["no_proxy"] . "' "; $rq .= "WHERE ip = '" . $data["ns_ip_address"] . "'"; $pearDB->query($rq); }