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

Don't delete from word_upcase hash if in charts

Will Storey 10 лет назад
Родитель
Сommit
22ccdc4216
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      modules/Pisg/Parser/Logfile.pm

+ 5 - 1
modules/Pisg/Parser/Logfile.pm

@@ -746,7 +746,11 @@ sub _uniquify_nicks {
                 $stats->{word_upcase}{$realnick} ||= $stats->{word_upcase}{$word};
                 delete $stats->{wordcounts}{$word};
                 delete $stats->{wordnicks}{$word};
-                delete $stats->{word_upcase}{$word};
+                # We need the word case translation around if it is used as a
+                # song name.
+                if (!defined $stats->{chartcounts}{$word}) {
+                  delete $stats->{word_upcase}{$word};
+                }
             }
         }
     }