* luci/libs: http.protocol: split parse_message() in parse_message_header() and parse...
[project/luci.git] / libs / web / luasrc / config.lua
index 854b128..557303f 100644 (file)
@@ -25,24 +25,7 @@ limitations under the License.
 
 ]]--
 
-module("luci.config", package.seeall)
-require("luci.model.uci")
-require("luci.util")
-require("luci.sys")
-
--- Warning! This is only for fallback and compatibility purporses! --
-main = {}
-
--- This is where stylesheets and images go
-main.mediaurlbase = "/luci/media"
-
--- Does anybody think about browser autodetect here?
--- Too bad busybox doesn't populate HTTP_ACCEPT_LANGUAGE
-main.lang = "de"
-
-
--- Now overwrite with UCI values
-local ucidata = luci.model.uci.sections("luci")
-if ucidata then
-       luci.util.update(luci.config, ucidata)
-end
\ No newline at end of file
+module("luci.config",
+       function(m)
+               setmetatable(m, {__index = require("luci.model.uci").get_all("luci")})
+       end)
\ No newline at end of file