diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:17:43 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-04-28 12:17:43 +0000 |
commit | 169195727baa5ad1bf927f7aab41b17131577a7c (patch) | |
tree | dfe5edc5559fbf72d2776aae2f711dd536fd4ead | |
parent | f277d0e1c513b9d0261a3405fd66977cd8ecb451 (diff) | |
download | acf-ppp-169195727baa5ad1bf927f7aab41b17131577a7c.tar.bz2 acf-ppp-169195727baa5ad1bf927f7aab41b17131577a7c.tar.xz |
Updated for handle_form now passing self to get and set functions
-rw-r--r-- | ppp-model.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ppp-model.lua b/ppp-model.lua index 82acc2c..8374fe9 100644 --- a/ppp-model.lua +++ b/ppp-model.lua @@ -47,8 +47,8 @@ function read_papfiledetails() return modelfunctions.getfiledetails(papfile) end -function update_papfiledetails(filedetails) - local retval = modelfunctions.setfiledetails(filedetails, {papfile}) +function update_papfiledetails(self, filedetails) + local retval = modelfunctions.setfiledetails(self, filedetails, {papfile}) posix.chmod(papfile, "rw-------") return retval end @@ -57,8 +57,8 @@ function read_chapfiledetails() return modelfunctions.getfiledetails(chapfile) end -function update_chapfiledetails(filedetails) - local retval = modelfunctions.setfiledetails(filedetails, {chapfile}) +function update_chapfiledetails(self, filedetails) + local retval = modelfunctions.setfiledetails(self, filedetails, {chapfile}) posix.chmod(chapfile, "rw-------") return retval end @@ -73,7 +73,7 @@ function get_newpeer() return cfe({ type="group", value=newpeer, label="New Peer" }) end -function create_peer(newpeer) +function create_peer(self, newpeer) newpeer.errtxt = "Failed to create peer" local path = newpeer.value.name.value if not string.find(path, "/") then @@ -113,6 +113,6 @@ function read_peerfile(name) return modelfunctions.getfiledetails(name, fs.find_files_as_array(nil, peerspath)) end -function update_peerfile(filedetails) - return modelfunctions.setfiledetails(filedetails, fs.find_files_as_array(nil, peerspath)) +function update_peerfile(self, filedetails) + return modelfunctions.setfiledetails(self, filedetails, fs.find_files_as_array(nil, peerspath)) end |