Commit 16919572 authored by Ted Trask's avatar Ted Trask

Updated for handle_form now passing self to get and set functions

parent f277d0e1
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment