Index: openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl,v diff -u -r1.16.2.3 -r1.16.2.4 --- openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 4 Aug 2020 09:43:32 -0000 1.16.2.3 +++ openacs-4/packages/xotcl-request-monitor/www/whos-online.tcl 20 Jan 2022 09:59:46 -0000 1.16.2.4 @@ -123,11 +123,15 @@ if {$admin} { set total $peer_cat_count(others) foreach cat $peer_groups {incr total $peer_cat_count($cat)} - set summarize_categories "$total users logged in from: " - foreach cat $peer_groups { - append summarize_categories "$cat [format %.2f [expr {$peer_cat_count($cat)*100.0/$total}]]%, " + if {$total > 0} { + set summarize_categories "$total users logged in from: " + foreach cat $peer_groups { + append summarize_categories "$cat [format %.2f [expr {$peer_cat_count($cat)*100.0/$total}]]%, " + } + append summarize_categories "others [format %.2f [expr {$peer_cat_count(others)*100.0/$total}]]%. " + } else { + set summarize_categories "$total users logged in" } - append summarize_categories "others [format %.2f [expr {$peer_cat_count(others)*100.0/$total}]]%. " } else { set summarize_categories "" }