luci-app-ddns: rollup to 2.3.0 to reflect changes on ddns-scripts
[project/luci.git] / applications / luci-app-ddns / luasrc / model / cbi / ddns / hints.lua
index 2a65fd0..031bf51 100644 (file)
@@ -1,9 +1,9 @@
 -- Copyright 2014 Christian Schoenebeck <christian dot schoenebeck at gmail dot com>
 -- 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 = [[<font color="red">]]
@@ -22,15 +20,9 @@ bold_off = [[</strong>]]
 
 -- cbi-map definition -- #######################################################
 m = Map("ddns")
-
-m.title = [[<a href="]] .. DISP.build_url("admin", "services", "ddns") .. [[">]] ..
-               translate("Dynamic DNS") .. [[</a>]]
-
-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
@@ -39,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