From 89bbbd289315a40483cda5244a8626b7a965f956 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 2 Apr 2019 14:06:05 +0200 Subject: [PATCH] Revert "fixed IPAM config" This reverts commit 1fe1beb930337770170bce177105020bdb3c06bb [formerly 39b80d2ca41c21a823cdec5948e30109a81eeb2a] Former-commit-id: e11aec8e300db083b7ce04cb74d19de276e69eb7 --- pandora_console/include/functions_config.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index bab701ba50..5435de5b8a 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -81,6 +81,11 @@ function config_update_value($token, $value) $value = ($value); } + if (!isset($config[$token])) { + $config[$token] = $value; + return (bool) config_create_value($token, io_safe_input($value)); + } + // If it has not changed. if ($config[$token] == $value) { return true; @@ -95,18 +100,10 @@ function config_update_value($token, $value) ['token' => $token] ); - if ($result == 0) { + if ($result === 0) { return true; } else { - if (!isset($config[$token])) { - $config[$token] = $value; - return (bool) config_create_value( - $token, - io_safe_input($value) - ); - } else { - return (bool) $result; - } + return (bool) $result; } }