* libs/cbi: Fixed a bug which prevented creation of non-anonymous sections
authorSteven Barth <steven@midlink.org>
Sun, 8 Jun 2008 21:21:33 +0000 (21:21 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 8 Jun 2008 21:21:33 +0000 (21:21 +0000)
libs/cbi/luasrc/cbi.lua

index fbd2355..2e788be 100644 (file)
@@ -173,7 +173,11 @@ end
 
 -- UCI set
 function Map.set(self, section, option, value)
 
 -- UCI set
 function Map.set(self, section, option, value)
-       return uci.set(self.config, section, option or value, option and value)
+       if option then
+               return uci.set(self.config, section, option, value)
+       else
+               return uci.set(self.config, section, value)
+       end
 end
 
 -- UCI del
 end
 
 -- UCI del