提交 4fb5f1ac 编写于 作者: J Jo-Philipp Wich

libs/web: pass origin section id to :create() callback, needed when multiple,...

libs/web: pass origin section id to :create() callback, needed when multiple, filtered TypedSection instances of the same type are used within a single Map
上级 b666015d
......@@ -1095,10 +1095,10 @@ function TypedSection.parse(self, novld)
-- Create
local created
local crval = CREATE_PREFIX .. self.config .. "." .. self.sectiontype
local name = self.map:formvalue(crval)
local origin, name = next(self.map:formvaluetable(crval))
if self.anonymous then
if name then
created = self:create()
created = self:create(nil, origin)
end
else
if name then
......@@ -1114,7 +1114,7 @@ function TypedSection.parse(self, novld)
end
if name and #name > 0 then
created = self:create(name) and name
created = self:create(name, origin) and name
if not created then
self.invalid_cts = true
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册