madeon (madeon) wrote in changelog,
madeon
madeon
changelog

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

Committer: sbelyaev
LJSUP-12148: JSON-RPC
U   trunk/cgi-bin/LJ/Entry.pm
U   trunk/cgi-bin/LJ/S2.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2012-05-14 10:39:28 UTC (rev 21945)
+++ trunk/cgi-bin/LJ/Entry.pm	2012-05-14 10:59:26 UTC (rev 21946)
@@ -1503,8 +1503,8 @@
 }
 
 sub convert_to_repost {
-    my ($class, $url) = @_;
-    $class->set_prop( 'repost_link' =>  $url);
+    my ($class, $mark) = @_;
+    $class->set_prop( 'repost_link' =>  $mark);
 } 
 
 sub original_post {

Modified: trunk/cgi-bin/LJ/S2.pm
===================================================================
--- trunk/cgi-bin/LJ/S2.pm	2012-05-14 10:39:28 UTC (rev 21945)
+++ trunk/cgi-bin/LJ/S2.pm	2012-05-14 10:59:26 UTC (rev 21946)
@@ -3983,7 +3983,6 @@
     my $posteru  = $this->{'poster'}->{'_u'};
     my $remote = LJ::get_remote();
     my $null_link = { '_type' => 'Link', '_isnull' => 1 };
-    my $journalu      = LJ::load_user($journal);
     my $real_user = $this->{'real_journalid'} ? LJ::want_user($this->{'real_journalid'}) : undef;
 
     if ($this->{'real_itemid'}) {
@@ -3991,7 +3990,8 @@
             return $null_link unless $remote;
             return $null_link unless LJ::u_equals($remote, $real_user);
 
-            return LJ::S2::Link("$LJ::SITEROOT/$this->{'real_itemid'}",
+            my $entry = LJ::Entry->new($journalu, ditemid => $this->{'itemid'});
+            return LJ::S2::Link($entry->url,
                             $ctx->[S2::PROPS]->{"text_delete_repost"},
                             LJ::S2::Image("$LJ::IMGPREFIX/btn_delete_repost.gif", 24, 24));
         }

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