summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2015-10-04 03:07:42 +0000
committerTed Trask <ttrask01@yahoo.com>2015-10-04 03:13:38 +0000
commitd67efeef4ea5d6b9f05bbcd71504e004d29265fd (patch)
tree40cbbac5b6b5eafd1d265a6f46f3fb4b602d7f35
parent0795a10e18f757c3d02ec32a5dc6ea484ae128f5 (diff)
downloadacf-core-d67efeef4ea5d6b9f05bbcd71504e004d29265fd.tar.bz2
acf-core-d67efeef4ea5d6b9f05bbcd71504e004d29265fd.tar.xz
Modify acf_www-controller.handle_clientdata to handle multi data coming in as an array instead of just as a string.
(cherry picked from commit bcdfc1ab56199a17c533b18e84f96694b13ce43b)
-rw-r--r--app/acf_www-controller.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua
index 1fd16d5..614cd75 100644
--- a/app/acf_www-controller.lua
+++ b/app/acf_www-controller.lua
@@ -625,8 +625,12 @@ mymodule.handle_clientdata = function(form, clientdata)
value.value = {}
if clientdata[name] and clientdata[name] ~= "" then
-- for www we use \r separated list
- for l in string.gmatch(clientdata[name].."\n", "%s*([^\n]*%S)%s*\n") do
- table.insert(value.value, l)
+ if type(clientdata[name]) == "string" then
+ for l in string.gmatch(clientdata[name].."\n", "%s*([^\n]*%S)%s*\n") do
+ table.insert(value.value, l)
+ end
+ else
+ value.value = clientdata[name]
end
end
--[[