summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-09-25 18:35:42 +0000
committerTed Trask <ttrask01@yahoo.com>2008-09-25 18:35:42 +0000
commitd7dd7e74c68f715655c5c4e497b9f82ef336202e (patch)
tree50e55dc7e7044e361e4016a7d7cb4ca3470252c6 /www
parent2c4affc87e47ee7de9fd63d62b5f1c45e28b778b (diff)
downloadacf-core-d7dd7e74c68f715655c5c4e497b9f82ef336202e.tar.bz2
acf-core-d7dd7e74c68f715655c5c4e497b9f82ef336202e.tar.xz
Moved cfe into mvc.lua and removed cfe.lua.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1518 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'www')
-rwxr-xr-xwww/cgi-bin/mvc.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/www/cgi-bin/mvc.lua b/www/cgi-bin/mvc.lua
index 86a1bb4..aef3547 100755
--- a/www/cgi-bin/mvc.lua
+++ b/www/cgi-bin/mvc.lua
@@ -317,3 +317,17 @@ exception_handler = function (self, message )
print (tostring(message))
end
end
+
+-- create a Configuration Framework Entity (cfe)
+-- returns a table with at least "value", "type", and "label"
+cfe = function ( optiontable )
+ optiontable = optiontable or {}
+ me = { value="",
+ type="text",
+ label="" }
+ for key,value in pairs(optiontable) do
+ me[key] = value
+ end
+ return me
+end
+_G.cfe = cfe