From 2ede4d207de7ce367011c3715dc1410b86b29df1 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 28 Apr 2012 12:01:16 +0000 Subject: Updated for handle_form now passing self to get and set functions --- asterisk-model.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asterisk-model.lua b/asterisk-model.lua index 54f4404..b5e28fb 100644 --- a/asterisk-model.lua +++ b/asterisk-model.lua @@ -28,11 +28,11 @@ get_status = function() return modelfunctions.getstatus(processname, packagename, "Asterisk 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 @@ -40,8 +40,8 @@ get_file = function(clientdata) return modelfunctions.getfiledetails(clientdata.filename, is_valid_filename) end -update_file = function(filedetails) - local ret = modelfunctions.setfiledetails(filedetails, is_valid_filename) +update_file = function(self, filedetails) + local ret = modelfunctions.setfiledetails(self, filedetails, is_valid_filename) if not ret.errtxt then posix.chmod(filedetails.value.filename.value, "rw-------") posix.chown(filedetails.value.filename.value, posix.getpasswd("asterisk", "uid") or 0, posix.getpasswd("asterisk", "gid") or 0) -- cgit v1.2.3