Просмотр исходного кода

* Fix problem with number of rows shown when a nick has been ignored.
(thanks, Chris Thornhill)

Morten Brix Pedersen 22 лет назад
Родитель
Сommit
5ff2d43209
2 измененных файлов с 6 добавлено и 2 удалено
  1. 4 0
      docs/Changelog
  2. 2 2
      modules/Pisg/HTMLGenerator.pm

+ 4 - 0
docs/Changelog

@@ -1,3 +1,7 @@
+pisg (x.xx)
+   * Fix problem with number of rows shown when a nick has been ignored.
+   (thanks, Chris Thornhill)
+
 pisg (0.58) - Thu Sep, 9th 2004
    * Added new option, ShowFoulDecimals which configures the number of
    decimals used in statistics in foul numbers. (thanks, Thorbjörn Svensson)

+ 2 - 2
modules/Pisg/HTMLGenerator.pm

@@ -1981,7 +1981,7 @@ sub _mostnicks
         _html("<td>&nbsp;</td><td class=\"tdtop\"><b>$nick_txt</b></td>");
         _html("<td class=\"tdtop\"><b>$names_txt</b></td></tr>");
 
-        for(my $i = 0; $i < $self->{cfg}->{mostnickshistory}; $i++) {
+        for(my $i = 0, my $a = 0; $i < $self->{cfg}->{mostnickshistory}; $i++) {
             next if is_ignored($sortnicks[$i]);
             last unless $i < @sortnicks;
             my $nickcount = keys %{ $self->{stats}->{nicks}->{$sortnicks[$i]} };
@@ -1989,7 +1989,7 @@ sub _mostnicks
 
             next unless ($nickcount > 1);
 
-            my $a = $i + 1;
+            $a++;
             my $class = $a == 1 ? 'hirankc' : 'rankc';
             my $n = $nickcount > 1 ? $names1 : $names2;