From 529553e13a8aeec8c5aef5f0d44415d08c854212 Mon Sep 17 00:00:00 2001 From: Zach LeBar Date: Thu, 22 Mar 2012 13:13:27 +0000 Subject: 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. --- amavis-controller.lua | 7 ++----- amavis-model.lua | 8 ++++++-- amavis-startstop-html.lsp | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 120000 amavis-startstop-html.lsp 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 -- cgit v1.2.3