Skip to content

Commit

Permalink
Eliminate domain tag from Top tags
Browse files Browse the repository at this point in the history
tracks internal commit cb0503691a58260aaf23169e98262c76d5160719
  • Loading branch information
jamiemccarthy committed Aug 31, 2009
1 parent c2f9042 commit df3fcc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tagboxes/Top/Top.pm
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ sub run_process {
$scores->{$tnid} *= $length_mod;
}

# Eliminate the domaintag for (XXX) this website.
my $domain_tnid = $constants->{mainpage_nexus_tid};
$scores->{$tnid} &&= 0;

# Eliminate tagnames below the minimum score required, and
# those that didn't make it to the top 5
# XXX the "4" below (aka "top 5") is hardcoded currently, should be a var
Expand All @@ -187,6 +191,7 @@ sub run_process {
my @top = ( );
if ($fhid) {
@top = map { $tndata->{$_}{tagname} }
grep { $scores->{$_} >= 0 }
grep { $scores->{$_} >= $minscore1 }
sort {
$scores->{$b} <=> $scores->{$a}
Expand All @@ -203,6 +208,7 @@ sub run_process {
if ($type eq 'stories') {

my @top = map { $tndata->{$_}{tagname} }
grep { $scores->{$_} >= 0 }
grep { $scores->{$_} >= $minscore2 }
sort {
$scores->{$b} <=> $scores->{$a}
Expand Down

0 comments on commit df3fcc1

Please sign in to comment.