Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to...
[project/luci.git] / core / src / config.lua
1 --[[
2 LuCI - Configuration
3
4 Description:
5 Some LuCI configuration values read from uci file "luci"
6
7
8 FileId:
9 $Id$
10
11 License:
12 Copyright 2008 Steven Barth <steven@midlink.org>
13
14 Licensed under the Apache License, Version 2.0 (the "License");
15 you may not use this file except in compliance with the License.
16 You may obtain a copy of the License at 
17
18         http://www.apache.org/licenses/LICENSE-2.0 
19
20 Unless required by applicable law or agreed to in writing, software
21 distributed under the License is distributed on an "AS IS" BASIS,
22 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 See the License for the specific language governing permissions and
24 limitations under the License.
25
26 ]]--
27
28 module("luci.config", package.seeall)
29 require("luci.model.uci")
30 require("luci.util")
31 require("luci.sys")
32
33 -- Warning! This is only for fallback and compatibility purporses! --
34 main = {}
35
36 -- This is where stylesheets and images go
37 main.mediaurlbase = "/luci/media"
38
39 -- Does anybody think about browser autodetect here?
40 -- Too bad busybox doesn't populate HTTP_ACCEPT_LANGUAGE
41 main.lang = "de"
42
43
44 -- Now overwrite with UCI values
45 local ucidata = luci.model.uci.sections("luci")
46 if ucidata then
47         luci.util.update(luci.config, ucidata)
48 end