summaryrefslogtreecommitdiffstats
path: root/did-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-01-25 10:04:25 +0000
committerTed Trask <ttrask01@yahoo.com>2010-01-25 10:04:25 +0000
commit1819e3fab7608e35ef951151a2c438d53e55568d (patch)
tree2044be66f6836142210bc697dd9d7307954b676f /did-model.lua
parent3a891ad1e7eb2bcd1fee42cfa923f984610f76d6 (diff)
downloadacf-did-1819e3fab7608e35ef951151a2c438d53e55568d.tar.bz2
acf-did-1819e3fab7608e35ef951151a2c438d53e55568d.tar.xz
Added code for assigndefinition autocomplete of did. Not done yet.
Diffstat (limited to 'did-model.lua')
-rw-r--r--did-model.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/did-model.lua b/did-model.lua
index 0e39d7a..e7d1113 100644
--- a/did-model.lua
+++ b/did-model.lua
@@ -622,6 +622,22 @@ function getdefinitionlist(did, extension, identification, description, departme
return def
end
+function searchdefinitions(did)
+ local result = {}
+ local res, err = pcall(function()
+ local connected = databaseconnect(DatabaseUser)
+ local list = listdefinitions("^"..did)
+ for i,did in ipairs(list) do
+ result[#result+1] = did.did
+ end
+ if connected then databasedisconnect() end
+ end)
+ if not res then
+ def.errtxt = err
+ end
+ return cfe({ type="list", value=result, label="DID list" })
+end
+
function getdefinition(did)
local errtxt
local group = {}