diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:17:43 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:17:43 +0000 |
commit | 3e3b57d95cffc81ef56f5458c68998d2ccbf1b59 (patch) | |
tree | 02896d664ea0485599944c7cc3cfd5e04d286872 | |
parent | 06600e5d886ac3ed3ae5ee6ce04994b8c6f387f5 (diff) | |
download | acf-tcpproxy-3e3b57d95cffc81ef56f5458c68998d2ccbf1b59.tar.bz2 acf-tcpproxy-3e3b57d95cffc81ef56f5458c68998d2ccbf1b59.tar.xz |
Updated for handle_form now passing self to get and set functions
-rw-r--r-- | tcpproxy-model.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tcpproxy-model.lua b/tcpproxy-model.lua index 001905d..75d5c7b 100644 --- a/tcpproxy-model.lua +++ b/tcpproxy-model.lua @@ -188,11 +188,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -function get_startstop(clientdata) +function get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function startstop_service(startstop, action) +function startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -204,8 +204,8 @@ function getconfigfile() return modelfunctions.getfiledetails(configfile) end -function setconfigfile(filedetails) - return modelfunctions.setfiledetails(filedetails, {configfile}) +function setconfigfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, {configfile}) end function getsmtpstatus() @@ -283,7 +283,7 @@ function readsmtpentry(ipaddr) return cfe({ type="group", value={ipaddr=ipaddrcfe, server=server, addressonly=addressonly, domain=domain, optionalserver=optionalserver, optionalrewritelist=optionalrewritelist, senderlistfile=senderlistfile, rcptlistfile=rcptlistfile}, label="SMTP Proxy Entry" }) end -function updatesmtpentry(entry) +function updatesmtpentry(self, entry) local success, entry = validatesmtpentry(entry) if success then @@ -353,7 +353,7 @@ function getnewsmtpfile() return cfe({ type="group", value={filename=filename}, label="SMTP Proxy File" }) end -function createsmtpfile(filedetails) +function createsmtpfile(self, filedetails) local success = true if not validator.is_valid_filename(filedetails.value.filename.value, smtpdirectory) then @@ -380,8 +380,8 @@ function readsmtpfile(filename) return modelfunctions.getfiledetails(filename, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) end -function updatesmtpfile(filedetails) - return modelfunctions.setfiledetails(filedetails, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) +function updatesmtpfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, function(filename) return validator.is_valid_filename(filename, smtpdirectory) end) end function delsmtpfile(filename) |