Fixed minor bug in new config variables creation
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 27 Sep 2004 12:13:21 +0000 (12:13 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 27 Sep 2004 12:13:21 +0000 (12:13 +0000)
src/server/core/config.cpp

index 98e249d..b3aae02 100644 (file)
@@ -319,7 +319,8 @@ BOOL ConfigWriteStr(char *szVar, char *szValue, BOOL bCreate)
    if (bVarExist)
       sprintf(szQuery, "UPDATE config SET var_value='%s' WHERE var_name='%s'", szValue, szVar);
    else
-      sprintf(szQuery, "INSERT INTO config (var_name,var_value) VALUES ('%s','%s')", szVar, szValue);
+      sprintf(szQuery, "INSERT INTO config (var_name,var_value,is_visible,"
+                       "need_server_restart) VALUES ('%s','%s',0,0)", szVar, szValue);
    return DBQuery(g_hCoreDB, szQuery);
 }