From fe6a6653a3651d5f31bf75b23f96d570496737d9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 7 Jul 2008 15:38:35 +0000 Subject: 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 --- lib/viewfunctions.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/viewfunctions.lua') 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("

Command Result

\n
\n") for i,result in ipairs(cmdresult) do - io.write(result.value:gsub("\n", "
") .. "\n") + if result.value ~= "" then io.write(result.value:gsub("\n", "
") .. "\n") end + if result.descr then io.write('

' .. string.gsub(result.descr, "\n", "
") .. "

\n") end + if result.errtxt then io.write('

' .. string.gsub(result.errtxt, "\n", "
") .. "

\n") end end io.write("
\n") end -- cgit v1.2.3