diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-12-31 14:27:23 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-12-31 14:27:23 +0000 |
commit | 9f469a06780e66135cb3da9cfdedb48763931160 (patch) | |
tree | ddcb6f2375c81e90f276f31aa880b2654092603d /lib/viewfunctions.lua | |
parent | be4063286a0b8f46754c082178517b3c684c3dff (diff) | |
download | acf-core-9f469a06780e66135cb3da9cfdedb48763931160.tar.bz2 acf-core-9f469a06780e66135cb3da9cfdedb48763931160.tar.xz |
Moved non-ACF-specific libraries to acf-lib package, moved cfe_unpack function to viewfunctions library.
Diffstat (limited to 'lib/viewfunctions.lua')
-rw-r--r-- | lib/viewfunctions.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua index 5965d16..a45831c 100644 --- a/lib/viewfunctions.lua +++ b/lib/viewfunctions.lua @@ -1,4 +1,5 @@ require("html") +require("session") function displayitem(myitem) if not myitem then return end @@ -241,3 +242,13 @@ function displaypagination(page_data, page_info) io.write("</div>") end end + +-- give a cfe and get back a string of what is inside +-- great for troubleshooting 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>" .. html.html_escape(value) .. "</pre>" + return value + end +end |