Changeset 5968

Show
Ignore:
Timestamp:
03/28/10 00:52:06 (3 years ago)
Author:
jow
Message:

luci-0.9: merge r5967

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/branches/luci-0.9/modules/admin-full/luasrc/model/cbi/admin_system/system.lua

    r5951 r5968  
    1919 
    2020m = Map("system", translate("system"), translate("a_s_desc")) 
     21 
     22function m.on_parse() 
     23    local has_rdate = false 
     24 
     25    m.uci:foreach("system", "rdate", 
     26        function() 
     27            has_rdate = true 
     28            return false 
     29        end) 
     30 
     31    if not has_rdate then 
     32        m.uci:section("system", "rdate", nil, { }) 
     33        m.uci:save("system") 
     34    end 
     35end 
     36 
    2137 
    2238s = m:section(TypedSection, "system", "")