From 0874f88bc25066248c28b16d3bbf1ab5cd1f2611 Mon Sep 17 00:00:00 2001 From: Zach LeBar Date: Wed, 21 Mar 2012 15:06:32 +0000 Subject: Change all -controller.lua files 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 vmail-model .lua to make everything work. --- rc-controller.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'rc-controller.lua') diff --git a/rc-controller.lua b/rc-controller.lua index ba235b6..5030449 100644 --- a/rc-controller.lua +++ b/rc-controller.lua @@ -1,6 +1,6 @@ -module (..., package.seeall) +-- the rc controller -require("controllerfunctions") +module (..., package.seeall) default_action = "status" @@ -9,11 +9,9 @@ status = function(self) end edit = function(self) - return controllerfunctions.handle_form(self, - function() return self.model.read_runlevels(self.clientdata.servicename) end, - self.model.update_runlevels, self.clientdata, "Save", "Edit Service Runlevels") + return self.handle_form(self, self.model.read_runlevels, self.model.update_runlevels, self.clientdata, "Save", "Edit Service Runlevels") end startstop = function(self) - return self:redirect_to_referrer(self.model.handle_startstop(self.clientdata.servicename, self.clientdata.action)) + return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end -- cgit v1.2.3