# HG changeset patch # User Florian Zeitz # Date 1360108429 -3600 # Node ID e96361eb8286a6250863260671ce7866fd7ee367 # Parent 97bf651e32a41982baeeb6a615f6f3d27e9f5a68 mod_admin_adhoc: Fix info message for module reload/unload diff -r 97bf651e32a4 -r e96361eb8286 plugins/mod_admin_adhoc.lua --- a/plugins/mod_admin_adhoc.lua Wed Feb 06 00:51:25 2013 +0100 +++ b/plugins/mod_admin_adhoc.lua Wed Feb 06 00:53:49 2013 +0100 @@ -544,7 +544,8 @@ 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 @@ 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