diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-07-07 15:38:35 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-07-07 15:38:35 +0000 |
commit | fe6a6653a3651d5f31bf75b23f96d570496737d9 (patch) | |
tree | 7802467a04562fc8b78bb8353ca1636b8f0467de /lib/viewfunctions.lua | |
parent | 014556f6bc79658baf5e2babd78cbd6e1dcf4442 (diff) | |
download | acf-core-fe6a6653a3651d5f31bf75b23f96d570496737d9.tar.bz2 acf-core-fe6a6653a3651d5f31bf75b23f96d570496737d9.tar.xz |
Added errtxt to viewfunctions command result and added some validation code to modelfunctions.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1285 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/viewfunctions.lua')
-rw-r--r-- | lib/viewfunctions.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua index 45701d6..dd2fcda 100644 --- a/lib/viewfunctions.lua +++ b/lib/viewfunctions.lua @@ -183,7 +183,9 @@ function displaycommandresults(commands, session) if #cmdresult > 0 then io.write("<H1>Command Result</H1>\n<DL>\n") for i,result in ipairs(cmdresult) do - io.write(result.value:gsub("\n", "<BR>") .. "\n") + if result.value ~= "" then io.write(result.value:gsub("\n", "<BR>") .. "\n") end + if result.descr then io.write('<P CLASS="descr">' .. string.gsub(result.descr, "\n", "<BR>") .. "</P>\n") end + if result.errtxt then io.write('<P CLASS="error">' .. string.gsub(result.errtxt, "\n", "<BR>") .. "</P>\n") end end io.write("</DL>\n") end |