diff options
Diffstat (limited to 'libs/uvl/luasrc')
-rw-r--r-- | libs/uvl/luasrc/uvl.lua | 7 | ||||
-rw-r--r-- | libs/uvl/luasrc/uvl/datatypes.lua | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libs/uvl/luasrc/uvl.lua b/libs/uvl/luasrc/uvl.lua index b1d481062c..680581d220 100644 --- a/libs/uvl/luasrc/uvl.lua +++ b/libs/uvl/luasrc/uvl.lua @@ -351,7 +351,8 @@ end -- This is normally done on demand, so you don't have to call this function -- by yourself. -- @param scheme Name of the scheme to parse -function UVL.read_scheme( self, scheme ) +-- @param alias Create an alias for the loaded scheme +function UVL.read_scheme( self, scheme, alias ) local so = luci.uvl.scheme( self, scheme ) @@ -375,7 +376,9 @@ function UVL.read_scheme( self, scheme ) table.insert( schemes, sd ) end - return self:_read_scheme_parts( so, schemes ) + local ok, err = self:_read_scheme_parts( so, schemes ) + if ok and alias then self.packages[alias] = self.packages[scheme] end + return ok, err else return false, so:error(ERR.SME_FIND(so, self.schemedir)) end diff --git a/libs/uvl/luasrc/uvl/datatypes.lua b/libs/uvl/luasrc/uvl/datatypes.lua index ce18d47ed4..60377e289e 100644 --- a/libs/uvl/luasrc/uvl/datatypes.lua +++ b/libs/uvl/luasrc/uvl/datatypes.lua @@ -22,9 +22,9 @@ require("luci.util") function boolean( val ) - if val == "1" or val == "yes" or val == "on" then + if val == "1" or val == "yes" or val == "on" or val == "true" then return true - elseif val == "0" or val == "no" or val == "off" then + elseif val == "0" or val == "no" or val == "off" or val == "false" then return true end |