summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2014-09-12 03:22:35 +0000
committerTed Trask <ttrask01@yahoo.com>2014-09-12 03:22:35 +0000
commitda59e833390b1b2081d75422146147d47f738e09 (patch)
tree34d6425540c4437f9da24c0b5eef07fc5e29ab36
parentc6016c140754186d72b3272704e69b310a2dacc5 (diff)
downloadacf-core-da59e833390b1b2081d75422146147d47f738e09.tar.bz2
acf-core-da59e833390b1b2081d75422146147d47f738e09.tar.xz
Fix bug in acf_www-controler handle_clientdata where the cfe name is a number
-rw-r--r--app/acf_www-controller.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index a7cb42d..0ba143b 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -371,6 +371,7 @@ end
mymodule.dispatch = function (self, userprefix, userctlr, useraction)
local controller = nil
local viewtable
+ local starttime = os.time()
local success, err = xpcall ( function ()
if userprefix == nil then
@@ -500,6 +501,8 @@ mymodule.dispatch = function (self, userprefix, userctlr, useraction)
end
end
+ --self.logevent(self.conf.prefix..self.conf.controller.."/"..self.conf.action.." took"..os.difftime(os.time(), starttime))
+
return viewtable
end
@@ -603,6 +606,10 @@ mymodule.handle_clientdata = function(form, clientdata)
end
clientdata[name] = actualval
end
+ if tonumber(name) and not clientdata[name] then
+ -- If the name is a number, haserl will convert the string to a number index
+ clientdata[name] = clientdata[tonumber(name)]
+ end
if value.type == "group" then
mymodule.handle_clientdata(value, clientdata[name])
elseif value.type == "boolean" then