diff options
Diffstat (limited to 'postfix-controller.lua')
-rw-r--r-- | postfix-controller.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/postfix-controller.lua b/postfix-controller.lua index cce6733..501087b 100644 --- a/postfix-controller.lua +++ b/postfix-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) @@ -22,7 +19,7 @@ function listfiles(self) end function createfile(self) - return controllerfunctions.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create new file", "New file created") + return self.handle_form(self, self.model.getnewfile, self.model.createfile, self.clientdata, "Create", "Create new file", "New file created") end function deletefile(self) @@ -30,7 +27,7 @@ function deletefile(self) end function expert(self) - return controllerfunctions.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Postfix File", "File Saved") + return self.handle_form(self, function() return self.model.getfiledetails(self.clientdata.filename) end, self.model.updatefiledetails, self.clientdata, "Save", "Edit Postfix File", "File Saved") end function rebuilddatabases(self) |