From 8426a3512628e7e5d606aba1f1dcbc770f620ec9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 28 Apr 2012 12:17:45 +0000 Subject: Updated for handle_form now passing self to get and set functions --- openssh-model.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openssh-model.lua b/openssh-model.lua index ab3f61b..efb0992 100644 --- a/openssh-model.lua +++ b/openssh-model.lua @@ -47,11 +47,11 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS -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 @@ -63,8 +63,8 @@ function getconfigfile() return modelfunctions.getfiledetails(configfile) end -function setconfigfile(filedetails) - return modelfunctions.setfiledetails(filedetails, {configfile}) +function setconfigfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, {configfile}) end function read_config() @@ -87,7 +87,7 @@ function read_config() return cfe({ type="group", value=output, label="OpenSSH Config" }) end -function update_config(config) +function update_config(self, config) local success, config = validate_config(config) if success then @@ -267,7 +267,7 @@ function get_auth(user) return cmdresult end -function create_auth(authstr) +function create_auth(self, authstr) authstr.value.user.value = authstr.value.user.value or "root" local success = true if not authstr.value.user.value == "root" and (string.find(authstr.value.user.value, "/") or not fs.is_dir("/home/"..authstr.value.user.value)) then -- cgit v1.2.3