projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4483ebd
)
Fixed luci.config
author
Steven Barth
<steven@midlink.org>
Fri, 5 Sep 2008 18:39:42 +0000
(18:39 +0000)
committer
Steven Barth
<steven@midlink.org>
Fri, 5 Sep 2008 18:39:42 +0000
(18:39 +0000)
libs/web/luasrc/config.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/config.lua
b/libs/web/luasrc/config.lua
index dd3e01734ea20bac7b23890f4bcb0d083dc4310e..258f5e655faa3f08986313a87954d02756854164 100644
(file)
--- a/
libs/web/luasrc/config.lua
+++ b/
libs/web/luasrc/config.lua
@@
-25,14
+25,9
@@
limitations under the License.
]]--
-local util = require "luci.util"
-
-local pcall = pcall
-local require = require
-
-
-module "luci.config"
-
-pcall(function()
- setmetatable(_M, {__index=require "luci.model.uci".cursor():get_all("luci")})
-end)
+module("luci.config",
+ function(m)
+ if pcall(require, "luci.model.uci") then
+ setmetatable(m, {__index = luci.model.uci.cursor():get_all("luci")})
+ end
+ end)
\ No newline at end of file