diff options
author | Zach LeBar <zach@zachlebar.com> | 2012-03-22 13:13:27 +0000 |
---|---|---|
committer | Zach LeBar <zach@zachlebar.com> | 2012-03-29 12:37:17 +0000 |
commit | 529553e13a8aeec8c5aef5f0d44415d08c854212 (patch) | |
tree | 038447919be5e44437429ca854e68ee1358cbea6 | |
parent | a30b97b092520b2cf6665eccd9a4978a182d6723 (diff) | |
download | acf-amavisd-new-529553e13a8aeec8c5aef5f0d44415d08c854212.tar.bz2 acf-amavisd-new-529553e13a8aeec8c5aef5f0d44415d08c854212.tar.xz |
Changed amavis-controller.lua to use new handle_form() functions found in acf_www-controller.lua instead of the controllerfunctions.lua version and also instead of redirect_to_referrer(). Made corresponding changes to amavis-model.lua to make everything
work.
-rw-r--r-- | amavis-controller.lua | 7 | ||||
-rw-r--r-- | amavis-model.lua | 8 | ||||
l--------- | amavis-startstop-html.lsp | 1 |
3 files changed, 8 insertions, 8 deletions
diff --git a/amavis-controller.lua b/amavis-controller.lua index a7bc988..0648aac 100644 --- a/amavis-controller.lua +++ b/amavis-controller.lua @@ -1,8 +1,5 @@ module(..., package.seeall) --- Load libraries -require("controllerfunctions") - default_action = "status" function status(self) @@ -10,9 +7,9 @@ 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 expert(self) - return controllerfunctions.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Amavis Config", "Configuration Set") + return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit Amavis Config", "Configuration Set") end diff --git a/amavis-model.lua b/amavis-model.lua index d3d9ce0..2d7fce8 100644 --- a/amavis-model.lua +++ b/amavis-model.lua @@ -16,8 +16,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() diff --git a/amavis-startstop-html.lsp b/amavis-startstop-html.lsp deleted file mode 120000 index 0ea2627..0000000 --- a/amavis-startstop-html.lsp +++ /dev/null @@ -1 +0,0 @@ -../startstop-html.lsp
\ No newline at end of file |