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

* Most referenced nicks now works for nicks containing upper case chars
again (reported by Triper in SF tracker #1167424 and Scelt).

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

+ 2 - 0
docs/Changelog

@@ -15,6 +15,8 @@ pisg (0.66) - ??
    * Continue after empty directories were found (closes SF tracker #1184874
      by nandmaster).
    * Latest topic was sometimes set -1 days ago (reported by Jarkko Seppelin).
+   * Most referenced nicks now works for nicks containing upper case chars
+     again (reported by Triper in SF tracker #1167424 and Scelt).
 
 pisg (0.65) - Fri Apr, 15th 2005
    Christoph:

+ 3 - 3
modules/Pisg/HTMLGenerator.pm

@@ -1786,8 +1786,9 @@ sub _mostreferencednicks
     my %usages;
 
     foreach my $word (sort keys %{ $self->{stats}->{wordcounts} }) {
-        next if !exists $self->{stats}->{lines}{$word};
         next if is_ignored($word);
+        my $nick = is_nick($word) or next;
+        next if !exists $self->{stats}->{lines}{$nick};
         $usages{$word} = $self->{stats}->{wordcounts}{$word};
     }
 
@@ -1805,8 +1806,7 @@ sub _mostreferencednicks
         for(my $i = 0; $i < $self->{cfg}->{nickhistory}; $i++) {
             last if $i >= @popular;
             my $a = $i + 1;
-            my $popular   = is_nick($popular[$i]) || $self->{stats}->{word_upcase}{$popular[$i]} || $popular[$i];
-            $popular      = $self->_format_word($popular[$i]);
+            my $popular   = $self->_format_word(is_nick($popular[$i]));
             my $wordcount = $self->{stats}->{wordcounts}{$popular[$i]};
             my $lastused  = $self->_format_word($self->{stats}->{wordnicks}{$popular[$i]} || "");
             # this is undefined when a nick is referenced before being used