Commit 3300faf8 authored by Ted Trask's avatar Ted Trask

Fix database engine values in dbmodelfunctions.lua

parent ff7d801f
......@@ -10,7 +10,7 @@ local function get_connection(dbase, self, clientdata)
retval.value.connection = cfe({ type="group", value={}, label="Database Connection", seq=0 })
retval.value.connection.value.engine = cfe({ type="select", label="Database Engine", option={}, key=true, seq=1 })
for n,v in pairs(db.engine) do
retval.value.connection.value.engine.option[#retval.value.connection.value.engine.option+1] = {name=n, value=v}
retval.value.connection.value.engine.option[#retval.value.connection.value.engine.option+1] = {label=n, value=tostring(v)}
retval.value.connection.value.database = cfe({ label="Database", key=true, seq=2 })
retval.value.connection.value.user = cfe({ label="User", key=true, seq=3 })
......@@ -24,6 +24,8 @@ local function get_connection(dbase, self, clientdata)
for n,v in pairs(retval.value.connection.value) do
if dbase[n] then
retval.value.connection.value[n] = nil
elseif n == "engine" then
dbase[n] = tonumber(v.value)
dbase[n] = v.value
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment