File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ The sylog plugin has been in development for well over a decade with increasing
7979
8080--- develop ---
8181
82+ * issue #100 : Fix odd/even classes generation in report
8283* issue #96 : Syslog filtering does not work with some international characters
8384* issue #87 : Program data is not sync with syslog_incoming under PHP 7.2
8485
Original file line number Diff line number Diff line change 664664
665665 $ classes = array ('even ' , 'odd ' );
666666
667- $ i = 0 ;
668667 if (cacti_sizeof ($ items )) {
669- $ class = $ classes [ $ i % 2 ] ;
668+ $ i = 0 ;
670669 foreach ($ items as $ item ) {
670+ $ class = $ classes [$ i % 2 ];
671671 $ reptext .= '<tr class=" ' . $ class . '"><td class="host"> ' . $ item ['host ' ] . '</td><td class="date"> ' . $ item ['logtime ' ] . '</td><td class="message"> ' . html_escape ($ item ['message ' ]) . "</td></tr> \n" ;
672+ $ i ++;
672673 }
673- $ i ++;
674674 }
675675
676676 if ($ reptext != '' ) {
You can’t perform that action at this time.
0 commit comments