From 85cf1138ba7c5397e17f92b676561731b5e12152 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 28 Apr 2012 12:17:44 +0000 Subject: Updated for handle_form now passing self to get and set functions --- openvpn-model.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openvpn-model.lua b/openvpn-model.lua index f439fef..8cdd1b3 100644 --- a/openvpn-model.lua +++ b/openvpn-model.lua @@ -163,11 +163,11 @@ function getstatus() return modelfunctions.getstatus(processname, packagename, "OpenVPN Status") end -function get_startstop(clientdata) +function get_startstop(self, clientdata) return modelfunctions.get_startstop(processname) end -function startstop_service(startstop, action) +function startstop_service(self, startstop, action) return modelfunctions.startstop_service(startstop, action) end @@ -198,9 +198,9 @@ function get_filecontent() return modelfunctions.getfiledetails(configfile) end -function update_filecontent(filedetails) +function update_filecontent(self, filedetails) --FIXME validate - return modelfunctions.setfiledetails(filedetails, {configfile}) + return modelfunctions.setfiledetails(self, filedetails, {configfile}) end function list_certs() @@ -233,7 +233,7 @@ function new_upload_cert() return cfe({ type="group", value=value }) end -function upload_cert(newcert) +function upload_cert(self, newcert) local success = true -- Trying to upload a cert/key -- The way haserl works, cert contains the temporary file name -- cgit v1.2.3