summaryrefslogtreecommitdiffstats
path: root/lib/html.lua
diff options
context:
space:
mode:
authorMike Mason <ms13sp@gmail.com>2007-11-30 16:20:37 +0000
committerMike Mason <ms13sp@gmail.com>2007-11-30 16:20:37 +0000
commit19b53b147471298d093a81a0fdb102584dc28ae9 (patch)
treea51c93d9a13b679d2c622ce6be071a2ccc9cff09 /lib/html.lua
parent64cd4f554ad4e72568edbdbdd838451a684acf6e (diff)
downloadacf-core-19b53b147471298d093a81a0fdb102584dc28ae9.tar.bz2
acf-core-19b53b147471298d093a81a0fdb102584dc28ae9.tar.xz
Put the cfe_unpack function in html. This helps with cfe troubleshooting. Should have been in html.lua in the first place.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@395 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/html.lua')
-rw-r--r--lib/html.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/html.lua b/lib/html.lua
index 7e60c2c..312b0fb 100644
--- a/lib/html.lua
+++ b/lib/html.lua
@@ -243,3 +243,15 @@ function link ( v )
return ( "<a " .. str .. ">" .. (v.label or "" ) .. "</a>" )
end
+
+-- give a cfe and get back a string of what is inside
+-- great for troubleshotting and seeing what is really being passed to the view
+function cfe_unpack ( a )
+ if type(a) == "table" then
+ value = session.serialize("cfe", a)
+ value = "<pre>" .. value .. "</pre>"
+ return value
+ end
+
+end
+