body<= $LIMIT; my $fus = LJ::load_userids(@ids); @ids = grep { $fus->{$_}{journaltype} eq "P" } @ids; my %count; my $MAX_DELAY = 4; my $start = time(); while (@ids && time() < $start + $MAX_DELAY) { my $fid = shift @ids; my $fr = LJ::get_friends($fid); next unless $fr; $count{$_}++ foreach (keys %$fr); } my @pop = sort { $count{$b} <=> $count{$a} } keys %count; my $ret = $GET{'own'} ? "" : ""; my $rows; my $MAX_DISPLAY = 50; my $shown; foreach my $popid (@pop) { next if $fr->{$popid} && ! $GET{'own'}; last if ++$shown > $MAX_DISPLAY; my $u = LJ::load_userid($popid); my $count = $count{$popid}; $rows .= "
$ML{'.user'} | $ML{'.count'} |