X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-ddns%2Fluasrc%2Fmodel%2Fcbi%2Fddns%2Fhints.lua;h=031bf513cf3c22f1bb52d6e09dce638ecfa77696;hp=ff7aa7a41cc7ab8d2d6a456fe29e66a99ce13034;hb=28d86aeec5bd47846961073846519f428a1ddff9;hpb=31e7adea63a4e7174d7f91daa9d323ee78a17a18 diff --git a/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua b/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua index ff7aa7a41..031bf513c 100644 --- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua +++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua @@ -1,9 +1,9 @@ -- Copyright 2014 Christian Schoenebeck -- Licensed to the public under the Apache License 2.0. -local CTRL = require "luci.controller.ddns" -- this application's controller local DISP = require "luci.dispatcher" local SYS = require "luci.sys" +local CTRL = require "luci.controller.ddns" -- this application's controller local DDNS = require "luci.tools.ddns" -- ddns multiused functions -- check supported options -- ################################################## @@ -11,8 +11,6 @@ local DDNS = require "luci.tools.ddns" -- ddns multiused functions has_ssl = DDNS.check_ssl() -- HTTPS support and --bind-network / --interface has_proxy = DDNS.check_proxy() -- Proxy support has_dnstcp = DDNS.check_bind_host() -- DNS TCP support --- correct ddns-scripts version -need_update = DDNS.ipkg_ver_compare(DDNS.ipkg_ver_installed("ddns-scripts"), "<<", CTRL.DDNS_MIN) -- html constants font_red = [[]] @@ -22,16 +20,9 @@ bold_off = [[]] -- cbi-map definition -- ####################################################### m = Map("ddns") - --- first need to close from cbi map template our closed by template -m.title = [[]] .. - translate("Dynamic DNS") - -m.description = translate("Dynamic DNS allows that your router can be reached with " .. - "a fixed hostname while having a dynamically changing " .. - "IP address.") - -m.redirect = DISP.build_url("admin", "services", "ddns") +m.title = CTRL.app_title_back() +m.description = CTRL.app_description() +m.redirect = DISP.build_url("admin", "services", "ddns") -- SimpleSection definition -- ################################################# -- show Hints to optimize installation and script usage @@ -40,7 +31,7 @@ s = m:section( SimpleSection, translate("Below a list of configuration tips for your system to run Dynamic DNS updates without limitations") ) -- ddns_scripts needs to be updated for full functionality -if need_update then +if not CTRL.service_ok() then local dv = s:option(DummyValue, "_update_needed") dv.titleref = DISP.build_url("admin", "system", "packages") dv.rawhtml = true