diff options
author | Zach LeBar <zach@zachlebar.com> | 2012-04-03 18:57:11 +0000 |
---|---|---|
committer | Zach LeBar <zach@zachlebar.com> | 2012-04-03 18:57:11 +0000 |
commit | 6692843935d8e831750a23cea4547de105b0c50b (patch) | |
tree | 11c3e9405f7cd5f101a9a9d6bd0c8b5c11b81a48 | |
parent | dfcc407cee428c9b237a37467b966d3ce736e391 (diff) | |
download | acf-clamsmtp-6692843935d8e831750a23cea4547de105b0c50b.tar.bz2 acf-clamsmtp-6692843935d8e831750a23cea4547de105b0c50b.tar.xz |
Fixing acf-clamsmtp to work with changes made to acf-core.
Removing the use of controllerfunctions.lua and using the new 'handle_form()' found in acf_www-controller.lua. Also using 'handle_form()' in place of 'redirect_to_referrer()'.
-rw-r--r-- | clamsmtp-controller.lua | 7 | ||||
-rw-r--r-- | clamsmtp-model.lua | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/clamsmtp-controller.lua b/clamsmtp-controller.lua index 6aaddad..3230fb9 100644 --- a/clamsmtp-controller.lua +++ b/clamsmtp-controller.lua @@ -1,8 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - default_action = "status" function status(self) @@ -10,7 +7,7 @@ function status(self) end function startstop(self) - return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.clientdata) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end function details(self) @@ -18,5 +15,5 @@ function details(self) end function expert(self) - return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit ClamSMTP Config", "Configuration Set") + return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit ClamSMTP Config", "Configuration Set") end diff --git a/clamsmtp-model.lua b/clamsmtp-model.lua index 06e69e6..832b13f 100644 --- a/clamsmtp-model.lua +++ b/clamsmtp-model.lua @@ -18,8 +18,12 @@ local path = "PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin -- ################################################################################ -- PUBLIC FUNCTIONS -function startstop_service(action) - return modelfunctions.startstop_service(processname, action) +function get_startstop(clientdata) + return modelfunctions.get_startstop(processname) +end + +function startstop_service(startstop, action) + return modelfunctions.startstop_service(startstop, action) end function getstatus() |