madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22022: 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 09:31:49 UTC (rev 22021)
+++ trunk/cgi-bin/LJ/Entry/Repost.pm	2012-05-22 10:06:26 UTC (rev 22022)
@@ -167,11 +167,14 @@
 sub get_status {
     my ($class, $entry_obj, $u) = @_;
 
-    my $reposted = __get_repostid( $entry_obj->journal, 
-                                   $entry_obj->jitemid, $u->userid ) || 0;
+    my $reposted = 0;
+    if ($reposted) {
+        $reposted = __get_repostid( $entry_obj->journal, 
+                                    $entry_obj->jitemid, $u->userid ) || 0;
+    }
 
     return  { 'count'    =>  __get_count($entry_obj->journal, $entry_obj->jitemid), 
-              'reposted' => !!$reposted,
+              'reposted' => (! !$reposted) || 0,
             };
 }
 

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