diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:01:16 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:01:16 +0000 |
commit | 2ede4d207de7ce367011c3715dc1410b86b29df1 (patch) | |
tree | 648a287cc61b9077fa255833c033929d57bde118 | |
parent | 72973e98533b751b4094a139da8fb20dfaa5712a (diff) | |
download | acf-asterisk-2ede4d207de7ce367011c3715dc1410b86b29df1.tar.bz2 acf-asterisk-2ede4d207de7ce367011c3715dc1410b86b29df1.tar.xz |
Updated for handle_form now passing self to get and set functions
-rw-r--r-- | asterisk-model.lua | 8 |
1 files 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) |