Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: setConfigVar Arguments: server,varName,value Description: Page type: webl Render function: Module: demavu Page source: var db = Wub_GetDB("demavu"); var coll = Wub_GetCollection(db, "config"); if server == "-" then server = "staging" end; var queryObj = [. "server"=server, "varName" = varName .]; var setObj = [. "server"=server, "varName" = varName, "value" = value .]; var dbobj = Wub_NewDBObject(queryObj); var upobj = Wub_NewDBObject([. "$set" = setObj .]); var res = Wub_UpdateDB(coll, dbobj, upobj, true, true); value;