alf (red_alf) wrote in changelog,
alf
red_alf
changelog

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

Committer: afedorov
LJSUP-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,

Tags: afedorov, livejournal, pm, red_alf
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments