madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[ljcom] r11928: LJSUP-11909: New Repost feature

Committer: sbelyaev
LJSUP-11909: New Repost feature
U   trunk/cgi-bin/LJ/CleanHtml/Like.pm
Modified: trunk/cgi-bin/LJ/CleanHtml/Like.pm
===================================================================
--- trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-05-12 09:06:39 UTC (rev 11927)
+++ trunk/cgi-bin/LJ/CleanHtml/Like.pm	2012-05-12 09:35:31 UTC (rev 11928)
@@ -70,7 +70,11 @@
 sub  __repost {
     my ($self, $params) = @_;
 
-    $params->{'lj_like.repost'} = 1;
+    my $remote = LJ::get_remote();
+    my $auth_token = LJ::Auth->ajax_auth_token($remote, '/__api/');
+
+    $params->{'lj_like.repost'}     = 1;
+    $params->{'lj_like.auth_token'} = $auth_token;
 }
 
 sub  __facebook {
@@ -156,7 +160,8 @@
     my $entry_url = $self->{'entry_url'};
     my $entry_url_ehtml = LJ::ehtml($entry_url);
 
-    $params->{'tmpl_var url_ehtml'} = $entry_url_ehtml;
+    $params->{'url_ehtml'} = $entry_url_ehtml;
+    $params->{'site_root'} = $LJ::SITEROOT;
 
     foreach my $button (@$buttons) {
         if ( $button eq 'repost') {

Tags: ljcom, 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