return value[1]
end
elseif self.cast == "table" then
- return luci.util.split(value, "%s+", nil, true)
+ return { value }
end
end
t[#t+1] = x
end
end
- elseif self.cast == "table" then
- local x
- for x in util.imatch(value) do
- t[#t+1] = x
- end
else
t = { value }
end
local value = AbstractValue.formvalue(self, section)
if type(value) == "string" then
- local x
- local t = { }
- for x in value:gmatch("%S+") do
- t[#t+1] = x
+ if self.cast == "string" then
+ local x
+ local t = { }
+ for x in value:gmatch("%S+") do
+ t[#t+1] = x
+ end
+ value = t
+ else
+ value = { value }
end
- value = t
end
return value