projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b0c2e3
)
libs/web: don't fail if no langauge is set in luci config
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 16 Apr 2010 19:05:05 +0000
(19:05 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 16 Apr 2010 19:05:05 +0000
(19:05 +0000)
libs/web/luasrc/dispatcher.lua
patch
|
blob
|
history
diff --git
a/libs/web/luasrc/dispatcher.lua
b/libs/web/luasrc/dispatcher.lua
index 5f48043c509b2bf76402db1d43a6a14bb5d11c12..b79fdd38b98d7b1da55b5fc8a614b8513618fe54 100644
(file)
--- a/
libs/web/luasrc/dispatcher.lua
+++ b/
libs/web/luasrc/dispatcher.lua
@@
-149,7
+149,7
@@
function dispatch(request)
assert(conf.main,
"/etc/config/luci seems to be corrupt, unable to find section 'main'")
- local lang = conf.main.lang
+ local lang = conf.main.lang
or "auto"
if lang == "auto" then
local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or ""
for lpat in aclang:gmatch("[%w-]+") do
@@
-159,7
+159,7
@@
function dispatch(request)
break
end
end
-
end
+ end
require "luci.i18n".setlanguage(lang)
local c = ctx.tree