Merge pull request #412 from chris5560/for-15.05

[for-15.05] luci-app-ddns: update to 2.2.4-1 (not copied from master)
This commit is contained in:
Christian Schoenebeck 2015-06-14 20:46:18 +02:00
commit ffd45fd9c5
6 changed files with 31 additions and 38 deletions

View file

@ -10,7 +10,7 @@ PKG_NAME:=luci-app-ddns
# Version == major.minor.patch # Version == major.minor.patch
# increase on new functionality (minor) or patches (patch) # increase on new functionality (minor) or patches (patch)
PKG_VERSION:=2.2.2 PKG_VERSION:=2.2.4
# Release == build # Release == build
# increase on changes of translation files # increase on changes of translation files

View file

@ -15,7 +15,7 @@ local SYS = require "luci.sys"
local DDNS = require "luci.tools.ddns" -- ddns multiused functions local DDNS = require "luci.tools.ddns" -- ddns multiused functions
local UTIL = require "luci.util" local UTIL = require "luci.util"
DDNS_MIN = "2.2.0-1" -- minimum version of service required DDNS_MIN = "2.4.2-1" -- minimum version of service required
function index() function index()
local nxfs = require "nixio.fs" -- global definitions not available local nxfs = require "nixio.fs" -- global definitions not available

View file

@ -1156,11 +1156,13 @@ function fu.write(self, section, value)
end end
-- retry_count (NEW) -- ######################################################## -- retry_count (NEW) -- ########################################################
rc = ns:taboption("timer", Value, "retry_count", rc = ns:taboption("timer", Value, "retry_count")
translate("Error Retry Counter"), rc.title = translate("Error Retry Counter")
translate("On Error the script will stop execution after given number of retrys") ) rc.description = translate("On Error the script will stop execution after given number of retrys")
rc.default = 5 .. "<br />"
rc.rmempty = false -- validate ourselves for translatable error messages .. translate("The default setting of '0' will retry infinite.")
rc.default = 0
rc.rmempty = false -- validate ourselves for translatable error messages
function rc.validate(self, value) function rc.validate(self, value)
if not DTYP.uinteger(value) then if not DTYP.uinteger(value) then
return nil, err_tab_timer(self) .. translate("minimum value '0'") return nil, err_tab_timer(self) .. translate("minimum value '0'")

View file

@ -98,8 +98,7 @@ end
-- compare versions using "<=" "<" ">" ">=" "=" "<<" ">>" -- compare versions using "<=" "<" ">" ">=" "=" "<<" ">>"
function ipkg_ver_compare(ver1, comp, ver2) function ipkg_ver_compare(ver1, comp, ver2)
if not ver1 or not (#ver1 > 0) if not ver1 or not ver2
or not ver2 or not (#ver2 > 0)
or not comp or not (#comp > 0) then return nil end or not comp or not (#comp > 0) then return nil end
-- correct compare string -- correct compare string
if comp == "<>" or comp == "><" or comp == "!=" or comp == "~=" then comp = "~=" if comp == "<>" or comp == "><" or comp == "!=" or comp == "~=" then comp = "~="
@ -116,33 +115,19 @@ function ipkg_ver_compare(ver1, comp, ver2)
for i = 1, math.max(table.getn(av1),table.getn(av2)), 1 do for i = 1, math.max(table.getn(av1),table.getn(av2)), 1 do
local s1 = av1[i] or "" local s1 = av1[i] or ""
local s2 = av2[i] or "" local s2 = av2[i] or ""
local n1 = tonumber(s1)
local n2 = tonumber(s2)
-- one numeric and other empty string then set other to 0 -- first "not equal" found return true
if n1 and not n2 and (not s2 or #s2 == 0) then n2 = 0 end if comp == "~=" and (s1 ~= s2) then return true end
if n2 and not n1 and (not s1 or #s1 == 0) then n1 = 0 end -- first "lower" found return true
if (comp == "<" or comp == "<=") and (s1 < s2) then return true end
local nc = (n1 and n2) -- numeric compare -- first "greater" found return true
if (comp == ">" or comp == ">=") and (s1 > s2) then return true end
if nc then -- not equal then return false
-- first "not equal" found return true if (s1 ~= s2) then return false end
if comp == "~=" and (n1 ~= n2) then return true end
-- first "lower" found return true
if (comp == "<" or comp == "<=") and (n1 < n2) then return true end
-- first "greater" found return true
if (comp == ">" or comp == ">=") and (n1 > n2) then return true end
-- not equal then return false
if (n1 ~= n2) then return false end
else
if comp == "~=" and (s1 ~= s2) then return true end
if (comp == "<" or comp == "<=") and (s1 < s2) then return true end
if (comp == ">" or comp == ">=") and (s1 > s2) then return true end
if (s1 ~= s2) then return false end
end
end end
-- all equal then true
return true -- all equal and not compare greater or lower then true
return not (comp == "<" or comp == ">")
end end
-- read version information for given package if installed -- read version information for given package if installed

View file

@ -1,15 +1,15 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: luci-app-ddns\n" "Project-Id-Version: luci-app-ddns\n"
"POT-Creation-Date: 2015-02-08 18:30+0100\n" "POT-Creation-Date: 2015-05-08 21:29+0100\n"
"PO-Revision-Date: 2015-02-08 18:36+0100\n" "PO-Revision-Date: 2015-05-08 21:47+0100\n"
"Last-Translator: Christian Schoenebeck <christian.schoenebeck@gmail.com>\n" "Last-Translator: Christian Schoenebeck <christian.schoenebeck@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n" "X-Generator: Poedit 1.7.5\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: .\n" "X-Poedit-Basepath: .\n"
@ -452,7 +452,7 @@ msgstr ""
"wiederholen" "wiederholen"
msgid "On Error the script will stop execution after given number of retrys" msgid "On Error the script will stop execution after given number of retrys"
msgstr "Das Skript wird nach der gegebener Anzahlt von Fehlversuchen beendet" msgstr "Das Skript wird nach der gegebenen Anzahl von Fehlversuchen beendet."
msgid "Overview" msgid "Overview"
msgstr "Übersicht" msgstr "Übersicht"
@ -527,6 +527,9 @@ msgstr ""
"Die installierte Software 'ddns-scripts' unterstützt nicht alle verfügbaren " "Die installierte Software 'ddns-scripts' unterstützt nicht alle verfügbaren "
"Optionen." "Optionen."
msgid "The default setting of '0' will retry infinite."
msgstr "Der Standard-Wert von '0' wird es endlosen erneut versuchen."
msgid "There is no service configured." msgid "There is no service configured."
msgstr "Kein Dienst konfiguriert" msgstr "Kein Dienst konfiguriert"

View file

@ -444,6 +444,9 @@ msgid ""
"settings." "settings."
msgstr "" msgstr ""
msgid "The default setting of '0' will retry infinite."
msgstr ""
msgid "There is no service configured." msgid "There is no service configured."
msgstr "" msgstr ""