summaryrefslogtreecommitdiffstats
path: root/asterisk-model.lua
diff options
context:
space:
mode:
authorZach LeBar <zach@zachlebar.com>2012-03-29 13:39:34 +0000
committerZach LeBar <zach@zachlebar.com>2012-03-29 13:39:34 +0000
commit664f7e41674c2ab50fff296f6d3daf3eba829046 (patch)
tree3e86c372fe5f9f5785a399c772e0f719ff7990a1 /asterisk-model.lua
parentb468d5ebc05acc8d09b27e85fdbb994922a06e96 (diff)
downloadacf-asterisk-664f7e41674c2ab50fff296f6d3daf3eba829046.tar.bz2
acf-asterisk-664f7e41674c2ab50fff296f6d3daf3eba829046.tar.xz
Fixing acf-asterisk to work with changes made to acf-core.
Removing the use of controllerfunctions.lua and using the new 'handle_form()' found in acf_www-controller.lua. Also using 'handle_form()' in place of 'redirect_to_referrer()'.
Diffstat (limited to 'asterisk-model.lua')
-rw-r--r--asterisk-model.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/asterisk-model.lua b/asterisk-model.lua
index 38c6a89..afc6a7b 100644
--- a/asterisk-model.lua
+++ b/asterisk-model.lua
@@ -28,12 +28,16 @@ get_status = function()
return modelfunctions.getstatus(processname, packagename, "Asterisk Status")
end
-function startstop_service(action)
- return modelfunctions.startstop_service(processname, action, {"Start", "Stop", "Restart", "Reload"})
+function get_startstop(clientdata)
+ return modelfunctions.get_startstop(processname)
end
-get_file = function(filename)
- return modelfunctions.getfiledetails(filename, is_valid_filename)
+function startstop_service(startstop, action)
+ return modelfunctions.startstop_service(startstop, action)
+end
+
+get_file = function(clientdata)
+ return modelfunctions.getfiledetails(clientdata.filename, is_valid_filename)
end
update_file = function(filedetails)