[livejournal] r23356: LJSUP-7955: Top 6 commenters for ONTD

Nov 26, 2012 08:29


Committer: afedorovLJSUP-7955: Top 6 commenters for ONTD

U trunk/cgi-bin/LJ/Widget/TopUsers.pm

Modified: trunk/cgi-bin/LJ/Widget/TopUsers.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/TopUsers.pm 2012-11-26 07:36:00 UTC (rev 23355)
+++ trunk/cgi-bin/LJ/Widget/TopUsers.pm 2012-11-26 08:29:19 UTC (rev 23356)
@@ -48,17 +48,16 @@
my $count = $_->{count};
my $user = LJ::load_userid($_->{userid});

- my $userpic = undef;
- $userpic = $user->userpic() if $user;
+ next unless $user;

- warn "Cannot load user with id=$_->{userid}\n" unless $user;
- warn "Cannot load userpic with id=$_->{userid}\n" unless $userpic;
+ my $userpic = $user->userpic();

- if ($count && $user && $userpic) {
+
+ if ($count && $userpic) {
push @{$keys{$key}->{'data'}},
{
count => $count,
- userpic => $userpic ? $userpic->url : '',
+ userpic => $userpic->url,
display => $user->ljuser_display,
user => $user->user,
url => $user->journal_base,

livejournal, red_alf, afedorov, pm

Previous post Next post
Up