From 9f469a06780e66135cb3da9cfdedb48763931160 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Thu, 31 Dec 2009 14:27:23 +0000 Subject: Moved non-ACF-specific libraries to acf-lib package, moved cfe_unpack function to viewfunctions library. --- lib/viewfunctions.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/viewfunctions.lua') 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("") 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 = "
" .. html.html_escape(value) .. "
" + return value + end +end -- cgit v1.2.3