* 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 fbd235595fbafc43f7ed9ae4ca96fa26aae19bdf..2e788be5f95e25a2357d99165bff69d769e0b119 100644 (file)
@@ -173,7 +173,11 @@ end
 
 -- 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