madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22020: LJSUP-12148: JSON-RPC

Committer: sbelyaev
LJSUP-12148: JSON-RPC
U   trunk/cgi-bin/LJ/Entry/Repost.pm
Modified: trunk/cgi-bin/LJ/Entry/Repost.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry/Repost.pm	2012-05-22 08:51:20 UTC (rev 22019)
+++ trunk/cgi-bin/LJ/Entry/Repost.pm	2012-05-22 09:29:40 UTC (rev 22020)
@@ -263,10 +263,11 @@
     my $reposters = $dbcr->selectcol_arrayref( 'SELECT reposterid ' .
                                                'FROM repost2 ' .
                                                'WHERE journalid = ? AND jitemid = ? ' . $after . 
-                                               'LIMIT 20',
+                                               'LIMIT 25',
                                                undef,
                                                $u->userid,
                                                $jitemid,);
+
     return $reposters;
 }
 
@@ -281,17 +282,24 @@
                                                 $jitemid, 
                                                 $lastuserid);
     if ($cached_reposters) {
+        warn "from cache";
         return $cached_reposters;
     }
+    warn "no cache";
  
     my $repostersids = __get_reposters( $entry->journal,
                                         $jitemid,
                                         $lastuserid );
 
-    my $reposters_info = {};
+    my $reposters_info = { users => {} };
+    my $users = $reposters_info->{'users'};
+
     foreach my $reposter (@$repostersids) {
         my $u = LJ::want_user($reposter);
-        $reposters_info->{'users'} = { $u->user  => $u->userhead_url };
+        warn "user url: ". $u->url;
+
+        $users->{$u->user} = { 'userhead' => $u->userhead_url,
+                               'url'      => $u->journal_base, };
     }   
     $reposters_info->{'last'} = $repostersids->[-1];
 

Tags: livejournal, madeon, pm, sbelyaev
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