From ca3c3c66692495aa0a6d7772e77bcc2371176154 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Wed, 6 Feb 2013 00:53:49 +0100 Subject: mod_admin_adhoc: Fix info message for module reload/unload --- plugins/mod_admin_adhoc.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/mod_admin_adhoc.lua b/plugins/mod_admin_adhoc.lua index 96cb3a76..bf00b73d 100644 --- a/plugins/mod_admin_adhoc.lua +++ b/plugins/mod_admin_adhoc.lua @@ -544,7 +544,8 @@ function reload_modules_handler(self, data, state) err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; end end - local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "").. + local info = (#ok_list > 0 and ("The following modules were successfully reloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "") + .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to reload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or ""); return { status = "completed", info = info }; else @@ -642,7 +643,8 @@ function unload_modules_handler(self, data, state) err_list[#err_list + 1] = module .. "(Error: " .. tostring(err) .. ")"; end end - local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "").. + local info = (#ok_list > 0 and ("The following modules were successfully unloaded on host "..data.to..":\n"..t_concat(ok_list, "\n")) or "") + .. ((#ok_list > 0 and #err_list > 0) and "\n" or "") .. (#err_list > 0 and ("Failed to unload the following modules on host "..data.to..":\n"..t_concat(err_list, "\n")) or ""); return { status = "completed", info = info }; else -- cgit v1.2.3