From 41455d6d9898ac1499553ce2496ded0af7b9fc3f Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 May 2019 17:52:32 +0800 Subject: [PATCH] Fix bad SQL query in AMS --- .../ams/plugins/Domain_Management/Domain_Management.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php index 5362eef6b..5b98fc152 100644 --- a/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php +++ b/code/web/private_php/ams/plugins/Domain_Management/Domain_Management.php @@ -159,8 +159,8 @@ function domain_management_hook_return_global() function domain_management_hook_activate() { $dbl = new DBLayer( "lib" ); - $sql = "INSERT INTO `settings` (Setting) - SELECT 'Domain_Auto_Add' FROM DUAL + $sql = "INSERT INTO `settings` (Setting, Value) + SELECT 'Domain_Auto_Add', 0 FROM DUAL WHERE NOT EXISTS (SELECT Setting FROM settings WHERE Setting='Domain_Auto_Add');";