]> git.ipfire.org Git - people/pmueller/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>
Sun, 19 Dec 2021 12:23:43 +0000 (13:23 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ids.cgi

index 927890ab522d999ea4a55cf5adad1807f774f8e2..9eb87273bd46f065f9fda4ba9aa47b4efce2fa31 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 {