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

* Fix warning when running on empty logs.

Christoph Berg 22 лет назад
Родитель
Сommit
ced24377aa
2 измененных файлов с 3 добавлено и 0 удалено
  1. 1 0
      docs/Changelog
  2. 2 0
      modules/Pisg/HTMLGenerator.pm

+ 1 - 0
docs/Changelog

@@ -1,5 +1,6 @@
 pisg (0.61) - ??
    Changes by Christoph Berg:
+   * Fix warning when running on empty logs.
    * More nick sanitizing.
    * Remove whitespace around user pictures, border="0", title.
    * docs/:

+ 2 - 0
modules/Pisg/HTMLGenerator.pm

@@ -2131,6 +2131,8 @@ sub _topactive {
     (@top_active) = @top_active[0..($self->{cfg}->{activenicks}+$self->{cfg}->{activenicks2}-1)];
     if(@top_active) {
         $self->{stats}->{topactive_lines} = $self->{stats}->{lines}{$top_active[0]};
+    } else {
+        $self->{stats}->{topactive_lines} = 1;
     }
             
     foreach (@top_active) {