git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
4fa474c
)
modules/admin-full: create rdate section in /e/c/system if there is none
author
Jo-Philipp Wich
<redacted>
Sat, 27 Mar 2010 23:51:39 +0000
(23:51 +0000)
committer
Jo-Philipp Wich
<redacted>
Sat, 27 Mar 2010 23:51:39 +0000
(23:51 +0000)
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
index 9f9c922319908d3dd1286fd3e5565b5b0c26c38a..c55ec0497e72d4a12cdea2590c982da3f56d3a04 100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
@@
-19,6
+19,22
@@
require("luci.fs")
m = Map("system", translate("System"), translate("Here you can configure the basic aspects of your device like its hostname or the timezone."))
+function m.on_parse()
+ local has_rdate = false
+
+ m.uci:foreach("system", "rdate",
+ function()
+ has_rdate = true
+ return false
+ end)
+
+ if not has_rdate then
+ m.uci:section("system", "rdate", nil, { })
+ m.uci:save("system")
+ end
+end
+
+
s = m:section(TypedSection, "system", "")
s.anonymous = true
s.addremove = false
git clone https://git.99rst.org/PROJECT