From: Jo-Philipp Wich Date: Sat, 27 Mar 2010 23:52:06 +0000 (+0000) Subject: luci-0.9: merge r5967 X-Git-Tag: 0.9.0~17 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=50f73513a9d38f8078ba846929679413dea76a58;p=oweals%2Fluci.git luci-0.9: merge r5967 --- 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 2a69e9a7e..8113a1fbb 100644 --- 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("a_s_desc")) +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