summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:44 +0000
committerTed Trask <ttrask01@yahoo.com>2012-04-28 12:17:44 +0000
commitf23c7d6a83381a8617ff74e8a0e740e146a7caec (patch)
tree1b1eb40f668ffe6406a9d478170050615ee5fba7
parent8ba14caa082f7b1195db58f96375f6240630200c (diff)
downloadacf-opennhrp-f23c7d6a83381a8617ff74e8a0e740e146a7caec.tar.bz2
acf-opennhrp-f23c7d6a83381a8617ff74e8a0e740e146a7caec.tar.xz
Updated for handle_form now passing self to get and set functions
-rw-r--r--opennhrp-controller.lua2
-rw-r--r--opennhrp-model.lua8
2 files changed, 5 insertions, 5 deletions
diff --git a/opennhrp-controller.lua b/opennhrp-controller.lua
index 4468997..832db2e 100644
--- a/opennhrp-controller.lua
+++ b/opennhrp-controller.lua
@@ -23,5 +23,5 @@ function editinterface(self)
end
function expert (self)
- return self.handle_form(self, function() return self.model:getconfigfile() end, function(value) return self.model:setconfigfile(value) end, self.clientdata, "Save", "Edit Config", "Configuration Set")
+ return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit Config", "Configuration Set")
end
diff --git a/opennhrp-model.lua b/opennhrp-model.lua
index b23cb67..365fceb 100644
--- a/opennhrp-model.lua
+++ b/opennhrp-model.lua
@@ -178,11 +178,11 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-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
@@ -247,7 +247,7 @@ function getinterfacedetails(interface)
return cfe({ type="group", value=details, label="OpenNHRP Interface Configuration" })
end
-function updateinterfacedetails(interfacedetails)
+function updateinterfacedetails(self, interfacedetails)
local success, interfacedetails = validateinterfacedetails(interfacedetails)
if success then
@@ -335,7 +335,7 @@ function getconfigfile(self)
end
function setconfigfile(self, filedetails)
- filedetails = modelfunctions.setfiledetails(filedetails, {configfile})
+ filedetails = modelfunctions.setfiledetails(self, filedetails, {configfile})
if not filedetails.errtxt then
configfilecontent = nil
config = nil