summaryrefslogtreecommitdiffstats
path: root/provisioning-scripts.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-27 01:43:30 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-27 01:43:30 +0000
commit148d568b3db38ada9cf0c5085d2c71584d588598 (patch)
tree681681965b7089d49121356a367f39f01c661f05 /provisioning-scripts.lua
parent24e737f23a7ef3a5f5871d75a23470d6ee27462e (diff)
downloadacf-provisioning-148d568b3db38ada9cf0c5085d2c71584d588598.tar.bz2
acf-provisioning-148d568b3db38ada9cf0c5085d2c71584d588598.tar.xz
Revert "Change function prototypes to pass self and use self.model instead of functions table"
This reverts commit fb00ff8f05dae3c110beceb929ea036e4cd14ae1. Conflicts: provisioning-model.lua Conflict was resolved by removing "mymodule." from function calls that are once again made local
Diffstat (limited to 'provisioning-scripts.lua')
-rw-r--r--provisioning-scripts.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/provisioning-scripts.lua b/provisioning-scripts.lua
index 325b07b..212e825 100644
--- a/provisioning-scripts.lua
+++ b/provisioning-scripts.lua
@@ -684,7 +684,7 @@ mymodule.param_groups_to_params = {
mymodule.provisioning_params = {
"CREATE TABLE provisioning_params (param_id SERIAL PRIMARY KEY, name VARCHAR(255) UNIQUE, type VARCHAR(255), label VARCHAR(255), descr VARCHAR(255), value VARCHAR(255), seq INTEGER, regexp VARCHAR(255), validate text)",
"CREATE INDEX params_name_idx ON provisioning_params (name)",
- "INSERT INTO provisioning_params VALUES(default, 'mac', 'text', 'MAC Address', 'Capitalized hex digits with no puncuation', '', '1', '^%x%x%x%x%x%x%x%x%x%x%x%x$', E'local self, value, params = ...\nvalue = string.upper(value)\nlocal others = self.getselectresponse(\"SELECT count(*) FROM provisioning_values WHERE param_id=\\'\"..params.value.device.value.mac.param_id..\"\\' AND device_id!=\\'\"..params.value.device_id.value..\"\\' AND value=\\'\"..value..\"\\'\")\nif tonumber(others[1].count) > 0 then\n\treturn value, \"MAC Address must be unique\"\nend\nreturn value')",
+ "INSERT INTO provisioning_params VALUES(default, 'mac', 'text', 'MAC Address', 'Capitalized hex digits with no puncuation', '', '1', '^%x%x%x%x%x%x%x%x%x%x%x%x$', E'local value, functions, params = ...\nvalue = string.upper(value)\nlocal others = functions.getselectresponse(\"SELECT count(*) FROM provisioning_values WHERE param_id=\\'\"..params.value.device.value.mac.param_id..\"\\' AND device_id!=\\'\"..params.value.device_id.value..\"\\' AND value=\\'\"..value..\"\\'\")\nif tonumber(others[1].count) > 0 then\n\treturn value, \"MAC Address must be unique\"\nend\nreturn value')",
"INSERT INTO provisioning_params VALUES(default, 'template', 'select', 'Template', '', '', '2', '', null)",
"INSERT INTO provisioning_params VALUES(default, 'registrar', 'text', 'SIP Registrar', '', '', '3', '', null)",
"INSERT INTO provisioning_params VALUES(default, 'digitmap', 'text', 'Digit Map', 'Phone dial pattern based on section 2.1.5 of RFC 3435, plus a comma to turn dialtone back on', '', '4', '^[*#0-9xT|,.%[%]-]*$', null)",
@@ -715,7 +715,7 @@ mymodule.provisioning_params = {
"INSERT INTO provisioning_params VALUES(default, 'speeddialenable', 'boolean', 'Speed Dial Enable', '', 'true', '206', '', null)",
"INSERT INTO provisioning_params VALUES(default, 'mailbox', 'text', 'Voice Mailbox', 'Mailbox extension or URL', '', '207', '', null)",
"INSERT INTO provisioning_params VALUES(default, 'mailcallback', 'text', 'Voice Mailbox Callback', 'Extension or URL for mailbox message retrieval', '', '208', '', null)",
- "INSERT INTO provisioning_params VALUES(default, 'databaseversion', 'text', 'Provisioning Database Version', 'Do not edit or delete!', '2', '999', '', null)"
+ "INSERT INTO provisioning_params VALUES(default, 'databaseversion', 'text', 'Provisioning Database Version', 'Do not edit or delete!', '1', '999', '', null)"
}
-- All of the (non-default) parameter values for all devices are stored here