]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids.cgi: Fix display issue with colum backgound colour in provider list.
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 2 Apr 2021 08:12:02 +0000 (10:12 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Tue, 3 Aug 2021 17:25:50 +0000 (19:25 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index ac1900eca8efdc49c2ea2e7030af8791be3e5955..af3d26b5aad8d2b2a223950d375617dbeec24f80 100644 (file)
@@ -1160,6 +1160,8 @@ print <<END;
                        <td class='base' colspan='3' bgcolor='$color{'color20'}'></td>
                </tr>
 END
+               my $line = 1;
+
                # Check if some providers has been configured.
                if (keys (%used_providers)) {
                        my $col = "";
@@ -1176,7 +1178,7 @@ END
                                my $status  = $used_providers{$id}[3];
 
                                # Check if the item number is even or not.
-                               if ($id % 2) {
+                               if ($line % 2) {
                                        $col="bgcolor='$color{'color22'}'";
                                } else {
                                        $col="bgcolor='$color{'color20'}'";
@@ -1244,6 +1246,9 @@ print <<END;
                                        </td>
                                </tr>
 END
+                       # Increment lines value.
+                       $line++;
+
                        }
 
                } else {