summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/luci-base/luasrc')
-rw-r--r--modules/luci-base/luasrc/dispatcher.luadoc2
-rw-r--r--modules/luci-base/luasrc/http.lua4
-rw-r--r--modules/luci-base/luasrc/http.luadoc4
-rw-r--r--modules/luci-base/luasrc/model/uci.lua2
-rw-r--r--modules/luci-base/luasrc/model/uci.luadoc6
-rw-r--r--modules/luci-base/luasrc/sys.luadoc8
-rw-r--r--modules/luci-base/luasrc/sys/iptparser.lua374
-rw-r--r--modules/luci-base/luasrc/sys/iptparser.luadoc69
-rw-r--r--modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua18
-rw-r--r--modules/luci-base/luasrc/sys/zoneinfo/tzoffset.lua4
-rw-r--r--modules/luci-base/luasrc/template.lua2
-rw-r--r--modules/luci-base/luasrc/util.lua2
-rw-r--r--modules/luci-base/luasrc/util.luadoc4
-rw-r--r--modules/luci-base/luasrc/view/cbi/apply_widget.htm4
-rw-r--r--modules/luci-base/luasrc/view/cbi/dropdown.htm2
-rw-r--r--modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm2
-rw-r--r--modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm14
-rw-r--r--modules/luci-base/luasrc/view/cbi/network_ifacelist.htm6
-rw-r--r--modules/luci-base/luasrc/view/cbi/network_netlist.htm8
19 files changed, 46 insertions, 489 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.luadoc b/modules/luci-base/luasrc/dispatcher.luadoc
index ddf534b3e1..f26256953a 100644
--- a/modules/luci-base/luasrc/dispatcher.luadoc
+++ b/modules/luci-base/luasrc/dispatcher.luadoc
@@ -22,7 +22,7 @@ Check whether a dispatch node shall be visible
]]
---[[
-Return a sorted table of visible childs within a given node
+Return a sorted table of visible children within a given node
@class function
@name node_childs
diff --git a/modules/luci-base/luasrc/http.lua b/modules/luci-base/luasrc/http.lua
index f4ede4b8a5..20b55f2854 100644
--- a/modules/luci-base/luasrc/http.lua
+++ b/modules/luci-base/luasrc/http.lua
@@ -335,13 +335,13 @@ end
-- Content-Type. Stores all extracted data associated with its parameter name
-- in the params table within the given message object. Multiple parameter
-- values are stored as tables, ordinary ones as strings.
--- If an optional file callback function is given then it is feeded with the
+-- If an optional file callback function is given then it is fed with the
-- file contents chunk by chunk and only the extracted file name is stored
-- within the params table. The callback function will be called subsequently
-- with three arguments:
-- o Table containing decoded (name, file) and raw (headers) mime header data
-- o String value containing a chunk of the file data
--- o Boolean which indicates wheather the current chunk is the last one (eof)
+-- o Boolean which indicates whether the current chunk is the last one (eof)
function mimedecode_message_body(src, msg, file_cb)
local parser, header, field
local len, maxlen = 0, tonumber(msg.env.CONTENT_LENGTH or nil)
diff --git a/modules/luci-base/luasrc/http.luadoc b/modules/luci-base/luasrc/http.luadoc
index f8121230b6..8f6f380d8b 100644
--- a/modules/luci-base/luasrc/http.luadoc
+++ b/modules/luci-base/luasrc/http.luadoc
@@ -204,13 +204,13 @@ Stores all extracted data associated with its parameter name
in the params table within the given message object. Multiple parameter
values are stored as tables, ordinary ones as strings.
-If an optional file callback function is given then it is feeded with the
+If an optional file callback function is given then it is fed with the
file contents chunk by chunk and only the extracted file name is stored
within the params table. The callback function will be called subsequently
with three arguments:
o Table containing decoded (name, file) and raw (headers) mime header data
o String value containing a chunk of the file data
- o Boolean which indicates wheather the current chunk is the last one (eof)
+ o Boolean which indicates whether the current chunk is the last one (eof)
@class function
@name mimedecode_message_body
diff --git a/modules/luci-base/luasrc/model/uci.lua b/modules/luci-base/luasrc/model/uci.lua
index 2119a210bb..a50e28a871 100644
--- a/modules/luci-base/luasrc/model/uci.lua
+++ b/modules/luci-base/luasrc/model/uci.lua
@@ -15,7 +15,7 @@ local type, tostring, tonumber, unpack = type, tostring, tonumber, unpack
-- cursor factory, modify data (via Cursor.add, Cursor.delete, etc.),
-- save the changes to the staging area via Cursor.save and finally
-- Cursor.commit the data to the actual config files.
--- LuCI then needs to Cursor.apply the changes so deamons etc. are
+-- LuCI then needs to Cursor.apply the changes so daemons etc. are
-- reloaded.
module "luci.model.uci"
diff --git a/modules/luci-base/luasrc/model/uci.luadoc b/modules/luci-base/luasrc/model/uci.luadoc
index d798b00338..0189d49aa1 100644
--- a/modules/luci-base/luasrc/model/uci.luadoc
+++ b/modules/luci-base/luasrc/model/uci.luadoc
@@ -5,7 +5,7 @@ The typical workflow for UCI is: Get a cursor instance from the
cursor factory, modify data (via Cursor.add, Cursor.delete, etc.),
save the changes to the staging area via Cursor.save and finally
Cursor.commit the data to the actual config files.
-LuCI then needs to Cursor.apply the changes so deamons etc. are
+LuCI then needs to Cursor.apply the changes so daemons etc. are
reloaded.
@cstyle instance
]]
@@ -172,7 +172,7 @@ has the same effect as deleting the option.
---[[
Create a sub-state of this cursor.
-The sub-state is tied to the parent curser, means it the parent unloads or
+The sub-state is tied to the parent cursor, means it the parent unloads or
loads configs, the sub state will do so as well.
@class function
@@ -339,7 +339,7 @@ Set the configuration directory.
]]
---[[
-Set the directory for uncommited changes.
+Set the directory for uncommitted changes.
@class function
@name Cursor.set_savedir
diff --git a/modules/luci-base/luasrc/sys.luadoc b/modules/luci-base/luasrc/sys.luadoc
index 1c1fa92602..3c7f69c6e9 100644
--- a/modules/luci-base/luasrc/sys.luadoc
+++ b/modules/luci-base/luasrc/sys.luadoc
@@ -18,7 +18,7 @@ Execute a given shell command and capture its standard output
@class function
@name exec
@param command Command to call
-@return String containg the return the output of the command
+@return String containing the return the output of the command
]]
---[[
@@ -38,7 +38,7 @@ exists.
@class function
@name getenv
@param var Name of the environment variable to retrieve (optional)
-@return String containg the value of the specified variable
+@return String containing the value of the specified variable
@return Table containing all variables if no variable name is given
]]
@@ -279,7 +279,7 @@ LuCI system utilities / user related functions.
]]
---[[
-Retrieve user informations for given uid.
+Retrieve user information for given uid.
@class function
@name getuser
@@ -305,7 +305,7 @@ Test whether given string matches the password of a given system user.
@name user.checkpasswd
@param username String containing the Unix user name
@param pass String containing the password to compare
-@return Boolean indicating wheather the passwords are equal
+@return Boolean indicating whether the passwords are equal
]]
---[[
diff --git a/modules/luci-base/luasrc/sys/iptparser.lua b/modules/luci-base/luasrc/sys/iptparser.lua
deleted file mode 100644
index 7ff665e7af..0000000000
--- a/modules/luci-base/luasrc/sys/iptparser.lua
+++ /dev/null
@@ -1,374 +0,0 @@
---[[
-
-Iptables parser and query library
-(c) 2008-2009 Jo-Philipp Wich <jow@openwrt.org>
-(c) 2008-2009 Steven Barth <steven@midlink.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
-]]--
-
-local luci = {}
-luci.util = require "luci.util"
-luci.sys = require "luci.sys"
-luci.ip = require "luci.ip"
-
-local pcall = pcall
-local io = require "io"
-local tonumber, ipairs, table = tonumber, ipairs, table
-
-module("luci.sys.iptparser")
-
-IptParser = luci.util.class()
-
-function IptParser.__init__( self, family )
- self._family = (tonumber(family) == 6) and 6 or 4
- self._rules = { }
- self._chains = { }
- self._tables = { }
-
- local t = self._tables
- local s = self:_supported_tables(self._family)
-
- if s.filter then t[#t+1] = "filter" end
- if s.nat then t[#t+1] = "nat" end
- if s.mangle then t[#t+1] = "mangle" end
- if s.raw then t[#t+1] = "raw" end
-
- if self._family == 4 then
- self._nulladdr = "0.0.0.0/0"
- self._command = "iptables -t %s --line-numbers -nxvL"
- else
- self._nulladdr = "::/0"
- self._command = "ip6tables -t %s --line-numbers -nxvL"
- end
-
- self:_parse_rules()
-end
-
-function IptParser._supported_tables( self, family )
- local tables = { }
- local ok, lines = pcall(io.lines,
- (family == 6) and "/proc/net/ip6_tables_names"
- or "/proc/net/ip_tables_names")
-
- if ok and lines then
- local line
- for line in lines do
- tables[line] = true
- end
- end
-
- return tables
-end
-
--- search criteria as only argument. If args is nil or an empty table then all
--- rules will be returned.
---
--- The following keys in the args table are recognized:
--- <ul>
--- <li> table - Match rules that are located within the given table
--- <li> chain - Match rules that are located within the given chain
--- <li> target - Match rules with the given target
--- <li> protocol - Match rules that match the given protocol, rules with
--- protocol "all" are always matched
--- <li> source - Match rules with the given source, rules with source
--- "0.0.0.0/0" (::/0) are always matched
--- <li> destination - Match rules with the given destination, rules with
--- destination "0.0.0.0/0" (::/0) are always matched
--- <li> inputif - Match rules with the given input interface, rules
--- with input interface "*" (=all) are always matched
--- <li> outputif - Match rules with the given output interface, rules
--- with output interface "*" (=all) are always matched
--- <li> flags - Match rules that match the given flags, current
--- supported values are "-f" (--fragment)
--- and "!f" (! --fragment)
--- <li> options - Match rules containing all given options
--- </ul>
--- The return value is a list of tables representing the matched rules.
--- Each rule table contains the following fields:
--- <ul>
--- <li> index - The index number of the rule
--- <li> table - The table where the rule is located, can be one
--- of "filter", "nat" or "mangle"
--- <li> chain - The chain where the rule is located, e.g. "INPUT"
--- or "postrouting_wan"
--- <li> target - The rule target, e.g. "REJECT" or "DROP"
--- <li> protocol The matching protocols, e.g. "all" or "tcp"
--- <li> flags - Special rule options ("--", "-f" or "!f")
--- <li> inputif - Input interface of the rule, e.g. "eth0.0"
--- or "*" for all interfaces
--- <li> outputif - Output interface of the rule,e.g. "eth0.0"
--- or "*" for all interfaces
--- <li> source - The source ip range, e.g. "0.0.0.0/0" (::/0)
--- <li> destination - The destination ip range, e.g. "0.0.0.0/0" (::/0)
--- <li> options - A list of specific options of the rule,
--- e.g. { "reject-with", "tcp-reset" }
--- <li> packets - The number of packets matched by the rule
--- <li> bytes - The number of total bytes matched by the rule
--- </ul>
--- Example:
--- <pre>
--- ip = luci.sys.iptparser.IptParser()
--- result = ip.find( {
--- target="REJECT",
--- protocol="tcp",
--- options={ "reject-with", "tcp-reset" }
--- } )
--- </pre>
--- This will match all rules with target "-j REJECT",
--- protocol "-p tcp" (or "-p all")
--- and the option "--reject-with tcp-reset".
-function IptParser.find( self, args )
-
- local args = args or { }
- local rv = { }
-
- args.source = args.source and self:_parse_addr(args.source)
- args.destination = args.destination and self:_parse_addr(args.destination)
-
- for i, rule in ipairs(self._rules) do
- local match = true
-
- -- match table
- if not ( not args.table or args.table:lower() == rule.table ) then
- match = false
- end
-
- -- match chain
- if not ( match == true and (
- not args.chain or args.chain == rule.chain
- ) ) then
- match = false
- end
-
- -- match target
- if not ( match == true and (
- not args.target or args.target == rule.target
- ) ) then
- match = false
- end
-
- -- match protocol
- if not ( match == true and (
- not args.protocol or rule.protocol == "all" or
- args.protocol:lower() == rule.protocol
- ) ) then
- match = false
- end
-
- -- match source
- if not ( match == true and (
- not args.source or rule.source == self._nulladdr or
- self:_parse_addr(rule.source):contains(args.source)
- ) ) then
- match = false
- end
-
- -- match destination
- if not ( match == true and (
- not args.destination or rule.destination == self._nulladdr or
- self:_parse_addr(rule.destination):contains(args.destination)
- ) ) then
- match = false
- end
-
- -- match input interface
- if not ( match == true and (
- not args.inputif or rule.inputif == "*" or
- args.inputif == rule.inputif
- ) ) then
- match = false
- end
-
- -- match output interface
- if not ( match == true and (
- not args.outputif or rule.outputif == "*" or
- args.outputif == rule.outputif
- ) ) then
- match = false
- end
-
- -- match flags (the "opt" column)
- if not ( match == true and (
- not args.flags or rule.flags == args.flags
- ) ) then
- match = false
- end
-
- -- match specific options
- if not ( match == true and (
- not args.options or
- self:_match_options( rule.options, args.options )
- ) ) then
- match = false
- end
-
- -- insert match
- if match == true then
- rv[#rv+1] = rule
- end
- end
-
- return rv
-end
-
-
--- through external commands.
-function IptParser.resync( self )
- self._rules = { }
- self._chain = nil
- self:_parse_rules()
-end
-
-
-function IptParser.tables( self )
- return self._tables
-end
-
-
-function IptParser.chains( self, table )
- local lookup = { }
- local chains = { }
- for _, r in ipairs(self:find({table=table})) do
- if not lookup[r.chain] then
- lookup[r.chain] = true
- chains[#chains+1] = r.chain
- end
- end
- return chains
-end
-
-
--- and "rules". The "rules" field is a table of rule tables.
-function IptParser.chain( self, table, chain )
- return self._chains[table:lower()] and self._chains[table:lower()][chain]
-end
-
-
-function IptParser.is_custom_target( self, target )
- for _, r in ipairs(self._rules) do
- if r.chain == target then
- return true
- end
- end
- return false
-end
-
-
--- [internal] Parse address according to family.
-function IptParser._parse_addr( self, addr )
- if self._family == 4 then
- return luci.ip.IPv4(addr)
- else
- return luci.ip.IPv6(addr)
- end
-end
-
--- [internal] Parse iptables output from all tables.
-function IptParser._parse_rules( self )
-
- for i, tbl in ipairs(self._tables) do
-
- self._chains[tbl] = { }
-
- for i, rule in ipairs(luci.util.execl(self._command % tbl)) do
-
- if rule:find( "^Chain " ) == 1 then
-
- local crefs
- local cname, cpol, cpkt, cbytes = rule:match(
- "^Chain ([^%s]*) %(policy (%w+) " ..
- "(%d+) packets, (%d+) bytes%)"
- )
-
- if not cname then
- cname, crefs = rule:match(
- "^Chain ([^%s]*) %((%d+) references%)"
- )
- end
-
- self._chain = cname
- self._chains[tbl][cname] = {
- policy = cpol,
- packets = tonumber(cpkt or 0),
- bytes = tonumber(cbytes or 0),
- references = tonumber(crefs or 0),
- rules = { }
- }
-
- else
- if rule:find("%d") == 1 then
-
- local rule_parts = luci.util.split( rule, "%s+", nil, true )
- local rule_details = { }
-
- -- cope with rules that have no target assigned
- if rule:match("^%d+%s+%d+%s+%d+%s%s") then
- table.insert(rule_parts, 4, nil)
- end
-
- -- ip6tables opt column is usually zero-width
- if self._family == 6 then
- table.insert(rule_parts, 6, "--")
- end
-
- rule_details["table"] = tbl
- rule_details["chain"] = self._chain
- rule_details["index"] = tonumber(rule_parts[1])
- rule_details["packets"] = tonumber(rule_parts[2])
- rule_details["bytes"] = tonumber(rule_parts[3])
- rule_details["target"] = rule_parts[4]
- rule_details["protocol"] = rule_parts[5]
- rule_details["flags"] = rule_parts[6]
- rule_details["inputif"] = rule_parts[7]
- rule_details["outputif"] = rule_parts[8]
- rule_details["source"] = rule_parts[9]
- rule_details["destination"] = rule_parts[10]
- rule_details["options"] = { }
-
- for i = 11, #rule_parts do
- if #rule_parts[i] > 0 then
- rule_details["options"][i-10] = rule_parts[i]
- end
- end
-
- self._rules[#self._rules+1] = rule_details
-
- self._chains[tbl][self._chain].rules[
- #self._chains[tbl][self._chain].rules + 1
- ] = rule_details
- end
- end
- end
- end
-
- self._chain = nil
-end
-
-
--- [internal] Return true if optlist1 contains all elements of optlist 2.
--- Return false in all other cases.
-function IptParser._match_options( self, o1, o2 )
-
- -- construct a hashtable of first options list to speed up lookups
- local oh = { }
- for i, opt in ipairs( o1 ) do oh[opt] = true end
-
- -- iterate over second options list
- -- each string in o2 must be also present in o1
- -- if o2 contains a string which is not found in o1 then return false
- for i, opt in ipairs( o2 ) do
- if not oh[opt] then
- return false
- end
- end
-
- return true
-end
diff --git a/modules/luci-base/luasrc/sys/iptparser.luadoc b/modules/luci-base/luasrc/sys/iptparser.luadoc
deleted file mode 100644
index 071e7d52e4..0000000000
--- a/modules/luci-base/luasrc/sys/iptparser.luadoc
+++ /dev/null
@@ -1,69 +0,0 @@
----[[
-LuCI iptables parser and query library
-
-@cstyle instance
-]]
-module "luci.sys.iptparser"
-
----[[
-Create a new iptables parser object.
-
-@class function
-@name IptParser
-@param family Number specifying the address family. 4 for IPv4, 6 for IPv6
-@return IptParser instance
-]]
-
----[[
-Find all firewall rules that match the given criteria. Expects a table with
-
-search criteria as only argument. If args is nil or an empty table then all
-rules will be returned.
-]]
-
----[[
-Rebuild the internal lookup table, for example when rules have changed
-
-through external commands.
-@class function
-@name IptParser.resync
-@return nothing
-]]
-
----[[
-Find the names of all tables.
-
-@class function
-@name IptParser.tables
-@return Table of table names.
-]]
-
----[[
-Find the names of all chains within the given table name.
-
-@class function
-@name IptParser.chains
-@param table String containing the table name
-@return Table of chain names in the order they occur.
-]]
-
----[[
-Return the given firewall chain within the given table name.
-
-@class function
-@name IptParser.chain
-@param table String containing the table name
-@param chain String containing the chain name
-@return Table containing the fields "policy", "packets", "bytes"
--- and "rules". The "rules" field is a table of rule tables.
-]]
-
----[[
-Test whether the given target points to a custom chain.
-
-@class function
-@name IptParser.is_custom_target
-@param target String containing the target action
-@return Boolean indicating whether target is a custom chain.
-]]
-
diff --git a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
index 47cb901a5b..c6f4477dff 100644
--- a/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
+++ b/modules/luci-base/luasrc/sys/zoneinfo/tzdata.lua
@@ -16,14 +16,14 @@ TZ = {
{ 'Africa/Brazzaville', 'WAT-1' },
{ 'Africa/Bujumbura', 'CAT-2' },
{ 'Africa/Cairo', 'EET-2' },
- { 'Africa/Casablanca', 'WET0WEST,M3.5.0,M10.5.0/3' },
+ { 'Africa/Casablanca', '<+01>-1' },
{ 'Africa/Ceuta', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Africa/Conakry', 'GMT0' },
{ 'Africa/Dakar', 'GMT0' },
{ 'Africa/Dar es Salaam', 'EAT-3' },
{ 'Africa/Djibouti', 'EAT-3' },
{ 'Africa/Douala', 'WAT-1' },
- { 'Africa/El Aaiun', 'WET0WEST,M3.5.0,M10.5.0/3' },
+ { 'Africa/El Aaiun', '<+01>-1' },
{ 'Africa/Freetown', 'GMT0' },
{ 'Africa/Gaborone', 'CAT-2' },
{ 'Africa/Harare', 'CAT-2' },
@@ -179,7 +179,7 @@ TZ = {
{ 'America/Resolute', 'CST6CDT,M3.2.0,M11.1.0' },
{ 'America/Rio Branco', '<-05>5' },
{ 'America/Santarem', '<-03>3' },
- { 'America/Santiago', '<-04>4<-03>,M8.2.6/24,M5.2.6/24' },
+ { 'America/Santiago', '<-04>4<-03>,M9.1.6/24,M4.1.6/24' },
{ 'America/Santo Domingo', 'AST4' },
{ 'America/Sao Paulo', '<-03>3<-02>,M11.1.0/0,M2.3.0/0' },
{ 'America/Scoresbysund', '<-01>1<+00>,M3.5.0/0,M10.5.0/1' },
@@ -261,7 +261,7 @@ TZ = {
{ 'Asia/Macau', 'CST-8' },
{ 'Asia/Magadan', '<+11>-11' },
{ 'Asia/Makassar', 'WITA-8' },
- { 'Asia/Manila', '<+08>-8' },
+ { 'Asia/Manila', 'PST-8' },
{ 'Asia/Muscat', '<+04>-4' },
{ 'Asia/Nicosia', 'EET-2EEST,M3.5.0/3,M10.5.0/4' },
{ 'Asia/Novokuznetsk', '<+07>-7' },
@@ -270,7 +270,7 @@ TZ = {
{ 'Asia/Oral', '<+05>-5' },
{ 'Asia/Phnom Penh', '<+07>-7' },
{ 'Asia/Pontianak', 'WIB-7' },
- { 'Asia/Pyongyang', 'KST-8:30' },
+ { 'Asia/Pyongyang', 'KST-9' },
{ 'Asia/Qatar', '<+03>-3' },
{ 'Asia/Qyzylorda', '<+06>-6' },
{ 'Asia/Riyadh', '<+03>-3' },
@@ -358,7 +358,7 @@ TZ = {
{ 'Europe/Busingen', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Chisinau', 'EET-2EEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Copenhagen', 'CET-1CEST,M3.5.0,M10.5.0/3' },
- { 'Europe/Dublin', 'GMT0IST,M3.5.0/1,M10.5.0' },
+ { 'Europe/Dublin', 'IST-1GMT0,M10.5.0,M3.5.0/1' },
{ 'Europe/Gibraltar', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Guernsey', 'GMT0BST,M3.5.0/1,M10.5.0' },
{ 'Europe/Helsinki', 'EET-2EEST,M3.5.0/3,M10.5.0/4' },
@@ -400,7 +400,7 @@ TZ = {
{ 'Europe/Vatican', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Vienna', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Vilnius', 'EET-2EEST,M3.5.0/3,M10.5.0/4' },
- { 'Europe/Volgograd', '<+03>-3' },
+ { 'Europe/Volgograd', '<+04>-4' },
{ 'Europe/Warsaw', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Zagreb', 'CET-1CEST,M3.5.0,M10.5.0/3' },
{ 'Europe/Zaporozhye', 'EET-2EEST,M3.5.0/3,M10.5.0/4' },
@@ -421,11 +421,11 @@ TZ = {
{ 'Pacific/Bougainville', '<+11>-11' },
{ 'Pacific/Chatham', '<+1245>-12:45<+1345>,M9.5.0/2:45,M4.1.0/3:45' },
{ 'Pacific/Chuuk', '<+10>-10' },
- { 'Pacific/Easter', '<-06>6<-05>,M8.2.6/22,M5.2.6/22' },
+ { 'Pacific/Easter', '<-06>6<-05>,M9.1.6/22,M4.1.6/22' },
{ 'Pacific/Efate', '<+11>-11' },
{ 'Pacific/Enderbury', '<+13>-13' },
{ 'Pacific/Fakaofo', '<+13>-13' },
- { 'Pacific/Fiji', '<+12>-12<+13>,M11.1.0,M1.2.1/147' },
+ { 'Pacific/Fiji', '<+12>-12<+13>,M11.1.0,M1.2.2/123' },
{ 'Pacific/Funafuti', '<+12>-12' },
{ 'Pacific/Galapagos', '<-06>6' },
{ 'Pacific/Gambier', '<-09>9' },
diff --git a/modules/luci-base/luasrc/sys/zoneinfo/tzoffset.lua b/modules/luci-base/luasrc/sys/zoneinfo/tzoffset.lua
index cf5afeb9d8..e63e2a6958 100644
--- a/modules/luci-base/luasrc/sys/zoneinfo/tzoffset.lua
+++ b/modules/luci-base/luasrc/sys/zoneinfo/tzoffset.lua
@@ -9,7 +9,6 @@ OFFSET = {
wat = 3600, -- WAT
cat = 7200, -- CAT
eet = 7200, -- EET
- wet = 0, -- WET
sast = 7200, -- SAST
hst = -36000, -- HST
hdt = -32400, -- HDT
@@ -34,8 +33,9 @@ OFFSET = {
idt = 10800, -- IDT
pkt = 18000, -- PKT
wita = 28800, -- WITA
- kst = 30600, -- KST
+ kst = 32400, -- KST
jst = 32400, -- JST
+ wet = 0, -- WET
acst = 34200, -- ACST
acdt = 37800, -- ACDT
aest = 36000, -- AEST
diff --git a/modules/luci-base/luasrc/template.lua b/modules/luci-base/luasrc/template.lua
index 588028c2ee..ed46f50753 100644
--- a/modules/luci-base/luasrc/template.lua
+++ b/modules/luci-base/luasrc/template.lua
@@ -95,6 +95,6 @@ function Template.render(self, scope)
local stat, err = util.copcall(self.template)
if not stat then
error("Failed to execute template '" .. self.name .. "'.\n" ..
- "A runtime error occured: " .. tostring(err or "(nil)"))
+ "A runtime error occurred: " .. tostring(err or "(nil)"))
end
end
diff --git a/modules/luci-base/luasrc/util.lua b/modules/luci-base/luasrc/util.lua
index f16b3afb2e..1a329f3f20 100644
--- a/modules/luci-base/luasrc/util.lua
+++ b/modules/luci-base/luasrc/util.lua
@@ -262,7 +262,7 @@ end
-- one token per invocation, the tokens are separated by whitespace. If the
-- input value is a table, it is transformed into a string first. A nil value
--- will result in a valid interator which aborts with the first invocation.
+-- will result in a valid iterator which aborts with the first invocation.
function imatch(v)
if type(v) == "table" then
local k = nil
diff --git a/modules/luci-base/luasrc/util.luadoc b/modules/luci-base/luasrc/util.luadoc
index c4f28d039a..4ec68dd1ef 100644
--- a/modules/luci-base/luasrc/util.luadoc
+++ b/modules/luci-base/luasrc/util.luadoc
@@ -158,7 +158,7 @@ Return a matching iterator for the given value.
The iterator will return one token per invocation, the tokens are separated by
whitespace. If the input value is a table, it is transformed into a string first.
-A nil value will result in a valid interator which aborts with the first invocation.
+A nil value will result in a valid iterator which aborts with the first invocation.
@class function
@name imatch
@@ -289,7 +289,7 @@ will be stripped before it is returned.
]]
---[[
-Strips unnescessary lua bytecode from given string.
+Strips unnecessary lua bytecode from given string.
Information like line numbers and debugging numbers will be discarded.
Original version by Peter Cawley (http://lua-users.org/lists/lua-l/2008-02/msg01158.html)
diff --git a/modules/luci-base/luasrc/view/cbi/apply_widget.htm b/modules/luci-base/luasrc/view/cbi/apply_widget.htm
index ce279edd40..0df16e88c8 100644
--- a/modules/luci-base/luasrc/view/cbi/apply_widget.htm
+++ b/modules/luci-base/luasrc/view/cbi/apply_widget.htm
@@ -93,11 +93,11 @@
if (r.status === 204) {
uci_status_message('warning',
'<h4><%:Configuration has been rolled back!%></h4>' +
- '<p><%:The device could not be reached within %d seconds after applying the pending changes, which caused the configuration to be rolled back for safety reasons. If you believe that the configuration changes are correct nonetheless, perform an unchecked configuration apply. Alternatively, you can dismiss this warning and edit changes before attempting to apply again, or revert all pending changes to keep the currently working configuration state.%></p>'.format(uci_apply_rollback) +
+ '<p><%:The device could not be reached within %d seconds after applying the pending changes, which caused the configuration to be rolled back for safety reasons. If you believe that the configuration changes are correct nonetheless, proceed by applying anyway. Alternatively, you can dismiss this warning and edit changes before attempting to apply again, or revert all pending changes to keep the currently working configuration state.%></p>'.format(uci_apply_rollback) +
'<div class="right">' +
'<input type="button" class="btn" onclick="uci_status_message(false)" value="<%:Dismiss%>" /> ' +
'<input type="button" class="btn cbi-button-action important" onclick="uci_revert()" value="<%:Revert changes%>" /> ' +
- '<input type="button" class="btn cbi-button-negative important" onclick="uci_apply(false)" value="<%:Apply unchecked%>" />' +
+ '<input type="button" class="btn cbi-button-negative important" onclick="uci_apply(false)" value="<%:Apply anyway%>" />' +
'</div>');
return;
diff --git a/modules/luci-base/luasrc/view/cbi/dropdown.htm b/modules/luci-base/luasrc/view/cbi/dropdown.htm
index cf8c03d22c..6f4b89905b 100644
--- a/modules/luci-base/luasrc/view/cbi/dropdown.htm
+++ b/modules/luci-base/luasrc/view/cbi/dropdown.htm
@@ -30,7 +30,7 @@
<li<%=
attr("data-index", i) ..
attr("data-depends", self:deplist2json(section, self.deplist[i])) ..
- attr("value", key) ..
+ attr("data-value", key) ..
ifattr(selected[key], "selected", "selected")
%>>
<%=pcdata(self.vallist[i])%>
diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm
index b38e4b13db..dc251dbd94 100644
--- a/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm
+++ b/modules/luci-base/luasrc/view/cbi/firewall_zoneforwards.htm
@@ -63,7 +63,7 @@
if empty then
%>
<label class="zonebadge zonebadge-empty">
- <strong><%=zone:forward():upper()%></strong>
+ <strong><%=def:forward():upper()%></strong>
</label>
<% end %>
</div>
diff --git a/modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm b/modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm
index 3a108020b6..7ecec10a8f 100644
--- a/modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm
+++ b/modules/luci-base/luasrc/view/cbi/firewall_zonelist.htm
@@ -30,7 +30,7 @@
ifattr(self.rmempty or self.optional, "optional", "optional")
%>>
<script type="item-template"><!--
- <li value="{{value}}">
+ <li data-value="{{value}}">
<span class="zonebadge" style="background:repeating-linear-gradient(45deg,rgba(204,204,204,0.5),rgba(204,204,204,0.5) 5px,rgba(255,255,255,0.5) 5px,rgba(255,255,255,0.5) 10px)">
<strong>{{value}}:</strong><em>(<%:create%>)</em>
</span>
@@ -38,7 +38,7 @@
--></script>
<ul>
<% if self.allowlocal then %>
- <li value=""<%=ifattr(checked[""], "selected", "selected")%>>
+ <li data-value=""<%=ifattr(checked[""], "selected", "selected")%>>
<span style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge">
<strong><%:Device%></strong>
<% if self.allowany and self.allowlocal then -%>
@@ -48,14 +48,14 @@
</span>
</li>
<% elseif self.widget ~= "checkbox" and (self.rmempty or self.optional) then %>
- <li value=""<%=ifattr(checked[""], "selected", "selected")%>>
+ <li data-value=""<%=ifattr(checked[""], "selected", "selected")%>>
<span class="zonebadge">
<em><%:unspecified%></em>
</span>
</li>
<% end %>
<% if self.allowany then %>
- <li value="*"<%=ifattr(checked["*"], "selected", "selected")%>>
+ <li data-value="*"<%=ifattr(checked["*"], "selected", "selected")%>>
<span style="background-color:<%=fwm.zone.get_color()%>" class="zonebadge">
<strong><%:Any zone%></strong>
<% if self.allowany and self.allowlocal then %>(<%:forward%>)<% end %>
@@ -67,7 +67,7 @@
if zone:name() ~= self.exclude then
selected = selected or (value == zone:name())
%>
- <li<%=attr("value", zone:name()) .. ifattr(checked[zone:name()], "selected", "selected")%>>
+ <li<%=attr("data-value", zone:name()) .. ifattr(checked[zone:name()], "selected", "selected")%>>
<span style="background-color:<%=zone:get_color()%>" class="zonebadge">
<strong><%=zone:name()%>:</strong>
<%-
@@ -94,11 +94,11 @@
<% end end %>
<% if self.widget ~= "checkbox" and not self.nocreate then %>
- <li value="-">
+ <li data-value="-">
<span class="zonebadge">
<em><%:create%>:</em>
<input type="password" style="display:none" />
- <input class="create-item-input" type="text" />
+ <input class="create-item-input" type="text" data-type="and(uciname,maxlength(11))" data-optional="true" />
</span>
</li>
<% end %>
diff --git a/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm b/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
index a97e9ef6d0..55a7e31687 100644
--- a/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
+++ b/modules/luci-base/luasrc/view/cbi/network_ifacelist.htm
@@ -47,7 +47,7 @@
ifattr(self.widget == "checkbox", "optional", "optional")
%>>
<script type="item-template"><!--
- <li value="{{value}}">
+ <li data-value="{{value}}">
<img title="<%:Custom Interface%>: &quot;{{value}}&quot;" src="<%=resource%>/icons/ethernet_disabled.png" />
<span class="hide-open">{{value}}</span>
<span class="hide-close"><%:Custom Interface%>: "{{value}}"</span>
@@ -61,7 +61,7 @@
iface:name() ~= self.exclude
then %>
<li<%=
- attr("value", iface:name()) ..
+ attr("data-value", iface:name()) ..
ifattr(checked[iface:name()], "selected", "selected")
%>>
<img<%=attr("title", iface:get_i18n())%> src="<%=resource%>/icons/<%=iface:type()%><%=iface:is_up() and "" or "_disabled"%>.png" />
@@ -78,7 +78,7 @@
</li>
<% end end %>
<% if not self.nocreate then %>
- <li value="">
+ <li data-value="">
<img title="<%:Custom Interface%>" src="<%=resource%>/icons/ethernet_disabled.png" />
<span><%:Custom Interface%>:</span>
<input type="password" style="display:none" />
diff --git a/modules/luci-base/luasrc/view/cbi/network_netlist.htm b/modules/luci-base/luasrc/view/cbi/network_netlist.htm
index ba6ebb8434..d3efcc062f 100644
--- a/modules/luci-base/luasrc/view/cbi/network_netlist.htm
+++ b/modules/luci-base/luasrc/view/cbi/network_netlist.htm
@@ -26,7 +26,7 @@
ifattr(self.widget == "checkbox", "optional", "optional")
%>>
<script type="item-template"><!--
- <li value="{{value}}">
+ <li data-value="{{value}}">
<span class="ifacebadge" style="background:repeating-linear-gradient(45deg,rgba(204,204,204,0.5),rgba(204,204,204,0.5) 5px,rgba(255,255,255,0.5) 5px,rgba(255,255,255,0.5) 10px)">
{{value}}: <em>(<%:create%>)</em>
</span>
@@ -34,7 +34,7 @@
--></script>
<ul>
<% if self.widget ~= "checkbox" then %>
- <li value=""<%= ifattr(not value, "selected", "selected") %>>
+ <li data-value=""<%= ifattr(not value, "selected", "selected") %>>
<em><%:unspecified%></em>
</li>
<% end %>
@@ -44,7 +44,7 @@
(net:name() ~= self.exclude) and
(not self.novirtual or not net:is_virtual())
then %>
- <li<%= attr("value", net:name()) .. ifattr(checked[net:name()], "selected", "selected") %>>
+ <li<%= attr("data-value", net:name()) .. ifattr(checked[net:name()], "selected", "selected") %>>
<span class="ifacebadge"><%=net:name()%>:
<%
local empty = true
@@ -63,7 +63,7 @@
<% end end %>
<% if not self.nocreate then %>
- <li value="-"<%= ifattr(not value and self.widget ~= "checkbox", "selected", "selected") %>>
+ <li data-value="-"<%= ifattr(not value and self.widget ~= "checkbox", "selected", "selected") %>>
<em>
<%- if self.widget == "checkbox" then -%>
<%:create:%>