summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:45 +0000
committerTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:45 +0000
commitf24fa679e99dfb4f1e1e9f5b2d5e19a979055b25 (patch)
treefad2844f56e754395d9c6a999cf51f95a5cf365f
parent15eff0f588679d3743475941345da9a46544f431 (diff)
downloadacf-iptables-f24fa679e99dfb4f1e1e9f5b2d5e19a979055b25.tar.bz2
acf-iptables-f24fa679e99dfb4f1e1e9f5b2d5e19a979055b25.tar.xz
Updated for handle_form now passing self to get and set functions
-rw-r--r--iptables-model.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/iptables-model.lua b/iptables-model.lua
index 162c357..06c4915 100644
--- a/iptables-model.lua
+++ b/iptables-model.lua
@@ -249,7 +249,7 @@ function read_chain(tab, chain)
return cfe({ type="group", value=retval, label="Chain" })
end
-function update_chain(chain)
+function update_chain(self, chain)
local success = true
getdetails()
if not details[chain.value.table.value] then
@@ -278,7 +278,7 @@ function update_chain(chain)
return chain
end
-function create_chain(chain)
+function create_chain(self, chain)
local success = true
getdetails()
if not details[chain.value.table.value] then
@@ -488,7 +488,7 @@ function read_rule(tab, chain, pos)
return cfe({ type="group", value=retval, label="Rule" })
end
-function create_rule(rule)
+function create_rule(self, rule)
local success, rule = validate_rule(rule)
if success then
@@ -513,7 +513,7 @@ function create_rule(rule)
return rule
end
-function update_rule(rule)
+function update_rule(self, rule)
local success, rule = validate_rule(rule)
if not tonumber(rule.value.position.value) then
rule.value.position.errtxt = "Must be a number"
@@ -557,15 +557,15 @@ function readrulesfile()
return modelfunctions.getfiledetails(rulesfile)
end
-function updaterulesfile(filedetails)
+function updaterulesfile(self, filedetails)
local rulesfile = format.get_ini_entry(fs.read_file(configfile) or "", "", "IPTABLES_SAVE")
- return modelfunctions.setfiledetails(filedetails, {rulesfile})
+ return modelfunctions.setfiledetails(self, filedetails, {rulesfile})
end
-function get_startstop(clientdata)
+function get_startstop(self, clientdata)
return modelfunctions.get_startstop(servicename)
end
-function startstop_service(startstop, action)
+function startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end