* ffluci.cbi: Fixed a problem where an error message occured when the first UCI section in an empty configuration file gets created
This commit is contained in:
parent
b08db70e90
commit
32274f49f0
1 changed files with 2 additions and 0 deletions
|
@ -147,6 +147,7 @@ function Map.add(self, sectiontype)
|
||||||
if name then
|
if name then
|
||||||
self.ucidata[name] = {}
|
self.ucidata[name] = {}
|
||||||
self.ucidata[name][".type"] = sectiontype
|
self.ucidata[name][".type"] = sectiontype
|
||||||
|
self.ucidata[".order"] = self.ucidata[".order"] or {}
|
||||||
table.insert(self.ucidata[".order"], name)
|
table.insert(self.ucidata[".order"], name)
|
||||||
end
|
end
|
||||||
return name
|
return name
|
||||||
|
@ -164,6 +165,7 @@ function Map.set(self, section, option, value)
|
||||||
self.ucidata[section] = {}
|
self.ucidata[section] = {}
|
||||||
end
|
end
|
||||||
self.ucidata[section][".type"] = val
|
self.ucidata[section][".type"] = val
|
||||||
|
self.ucidata[".order"] = self.ucidata[".order"] or {}
|
||||||
table.insert(self.ucidata[".order"], section)
|
table.insert(self.ucidata[".order"], section)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue