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 = ""; my $rows; my $MAX_DISPLAY = 150; my $shown; foreach my $popid (@pop) { last if ++$shown > $MAX_DISPLAY; my $u = LJ::load_userid($popid); my $count = $count{$popid}; $rows .= "" . LJ::ljuser($u) . " - " . LJ::ehtml($u->{name}) . "$count\n"; } if ($rows) { $ret .= "\n"; $ret .= "\n"; $ret .= $rows; $ret .= "
$ML{'.user'}$ML{'.count'}
\n"; $ret .= $GET{'own'} ? "" : ""; } return $ret; } _code?> <=body page?>