summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/model
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-01-18 19:22:54 +0100
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-01-18 19:22:54 +0100
commit819a733df3c9e93619dbad1159f67de70d406da7 (patch)
treef73dc2f21f5ca0a71c01f68cdbbe192380cac0d3 /applications/luci-app-ddns/luasrc/model
parent52ecc90b3129c72a856c3d16534276ab7e192179 (diff)
luci-app-ddns: Update to version 2.1.1-0
- adaption Makefile to changed luci.mk - description in Makefile for correct version handling - modified handling to detect and display installed version - new functions ipkg_ver_installed() and ipkg_ver_compare - correct wrong spellings - modified language template and German translation Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/model')
-rw-r--r--applications/luci-app-ddns/luasrc/model/cbi/ddns/detail.lua2
-rw-r--r--applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua3
-rw-r--r--applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua16
3 files changed, 16 insertions, 5 deletions
diff --git a/applications/luci-app-ddns/luasrc/model/cbi/ddns/detail.lua b/applications/luci-app-ddns/luasrc/model/cbi/ddns/detail.lua
index 057b8c8aa2..77753c03a7 100644
--- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/detail.lua
+++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/detail.lua
@@ -22,7 +22,7 @@ has_ipv6 = DDNS.check_ipv6() -- IPv6 support
has_ssl = DDNS.check_ssl() -- HTTPS support
has_proxy = DDNS.check_proxy() -- Proxy support
has_dnstcp = DDNS.check_bind_host() -- DNS TCP support
-has_force = has_ssl and has_dnstcp -- Force IP Protocoll
+has_force = has_ssl and has_dnstcp -- Force IP Protocoll
-- html constants -- ###########################################################
font_red = "<font color='red'>"
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 15da0289f1..009ba99eb8 100644
--- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
+++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/hints.lua
@@ -11,7 +11,8 @@ local DDNS = require "luci.tools.ddns" -- ddns multiused functions
has_ssl = DDNS.check_ssl() -- HTTPS support
has_proxy = DDNS.check_proxy() -- Proxy support
has_dnstcp = DDNS.check_bind_host() -- DNS TCP support
-need_update = CTRL.update_needed() -- correct ddns-scripts version
+-- 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">]]
diff --git a/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua b/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
index 2944ec52f9..83b10e9366 100644
--- a/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
+++ b/applications/luci-app-ddns/luasrc/model/cbi/ddns/overview.lua
@@ -14,7 +14,8 @@ show_hints = not (DDNS.check_ipv6() -- IPv6 support
and DDNS.check_proxy() -- Proxy support
and DDNS.check_bind_host() -- DNS TCP support
)
-need_update = CTRL.update_needed() -- correct ddns-scripts version
+-- 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">]]
@@ -28,8 +29,17 @@ m = Map("ddns")
-- first need to close <a> from cbi map template our <a> closed by template
--m.title = [[</a><a href="javascript:alert(']] .. CTRL.show_versions() ..[[')">]] ..
-- translate("Dynamic DNS")
-m.title = [[</a><a href="#" onclick="onclick_maptitle();">]] ..
- translate("Dynamic DNS")
+m.title = [[</a><a href="javascript:alert(']]
+ .. translate("Version Information")
+ .. [[\n\nluci-app-ddns]]
+ .. [[\n\t]] .. translate("Version") .. [[:\t]] .. DDNS.ipkg_ver_installed("luci-app-ddns")
+ .. [[\n\nddns-scripts ]] .. translate("required") .. [[:]]
+ .. [[\n\t]] .. translate("Version") .. [[:\t]] .. CTRL.DDNS_MIN .. [[ ]] .. translate("or higher")
+ .. [[\n\nddns-scripts ]] .. translate("installed") .. [[:]]
+ .. [[\n\t]] .. translate("Version") .. [[:\t]] .. DDNS.ipkg_ver_installed("ddns-scripts")
+ .. [[\n\n]]
+ .. [[')">]]
+ .. translate("Dynamic DNS")
m.description = translate("Dynamic DNS allows that your router can be reached with " ..
"a fixed hostname while having a dynamically changing " ..