diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-09-23 18:13:03 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-09-23 18:13:03 +0000 |
commit | fb00ff8f05dae3c110beceb929ea036e4cd14ae1 (patch) | |
tree | 51d124ce1c65e3a600a7da7b9dd57ffafd83f910 /config/update_device.lua | |
parent | 60ef6e20019e046aa801325d29893ada12b5d5af (diff) | |
download | acf-provisioning-fb00ff8f05dae3c110beceb929ea036e4cd14ae1.tar.bz2 acf-provisioning-fb00ff8f05dae3c110beceb929ea036e4cd14ae1.tar.xz |
Change function prototypes to pass self and use self.model instead of functions table
Changed the order of the first two parameters passed to validate function in provisioning_params
Replaced all APP references with self, now that self is available
Still need to implement swapvalidateparams script
Diffstat (limited to 'config/update_device.lua')
-rw-r--r-- | config/update_device.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/update_device.lua b/config/update_device.lua index 7295062..9823e95 100644 --- a/config/update_device.lua +++ b/config/update_device.lua @@ -1,7 +1,7 @@ -- This is the script run after editing a device - the label, classes -local functions, device, olddevice, params, oldparams = ... +local self, device, olddevice, params, oldparams = ... ---APP.logevent("got to update_device script") +--self.logevent("got to update_device script") -- We'll handle the changing of the device by handling the resulting changing of the params local env = {} @@ -10,5 +10,5 @@ setmetatable (env, {__index = _G}) -- so we set env 0, not env 1 setfenv (0, env) local f = loadfile("/etc/provisioning/update_device_params.lua") -if (f) then f(functions, params, oldparams) end +if (f) then f(self, params, oldparams) end setfenv (0, _G) |