Latest Posts head<= <=head body<= [1] - $stat->[2]) { my $rate_sec = $stat->[0] / $delta; my $rate_min = $rate_sec * 60; my $fmt_min = $rate_min > 10 ? "%.0f" : "%.2f"; my $rate_hour = $rate_min * 60; my $fmt_hour = $rate_hour > 10 ? "%.0f" : "%.2f"; my $post_min = sprintf($fmt_min, $rate_min); my $post_hour = sprintf($fmt_hour, $rate_hour); $ret .= "Current posting stats: $post_hour per hour, $post_min per minute\n"; } my @postids; foreach my $p (@$recent) { next unless $p->{security} eq 'public'; $p->{ditemid} = $p->{itemid}*256 + $p->{anum}; push @postids, [ $p->{clusterid}, $p->{journalu}{userid}, $p->{itemid} ]; } my $rawposts = LJ::get_posts_raw({memcache_only=>1}, @postids); $ret .= "RSS version"; $ret .= "\n"; foreach my $p (@$recent) { next unless $p->{security} eq 'public'; my $uj = $p->{'journalu'}; my $up = $p->{'journalp'}; my $id = "$uj->{userid}:$p->{itemid}"; # we shouldn't expect every post to be in the memcache. next unless $rawposts->{text}{$id}; # this sucks, but we can't load users here. next if $rawposts->{prop}{$id}{unknown8bit}; my $url = LJ::journal_base($uj) . "/$p->{'ditemid'}.html"; my ($subject, $body) = @{$rawposts->{text}{$id}}; $ret .= ""; $ret .= "\n"; } $ret .= "
" . substr(scalar(gmtime($p->{timepost})), 4, 12) . "\n"; $ret .= LJ::ljuser($up->{user}); if ($up->{userid} != $uj->{userid}) { $ret .= " (in " . LJ::ljuser($uj->{user}, {type => $uj->{journaltype}}) . ")"; } $ret .= ":
\n"; $ret .= "
"; LJ::CleanHTML::clean_subject(\$subject); LJ::CleanHTML::clean_event(\$body, {'cuturl' => LJ::item_link($uj, $p->{'itemid'}, $p->{'anum'})}); $ret .= "$subject
\n" if $subject; $ret .= $body; $ret .= "
\n"; BML::noparse(); return $ret; } _code?> <=body page?>