Committer: sbelyaev
LJSUP-12507: should not work PingBack bot for repost entryU trunk/cgi-bin/LJ/Entry/Repost.pm U trunk/cgi-bin/LJ/Hooks/PingBack.pm U trunk/cgi-bin/TheSchwartz/Worker/NotifyPingbackServer.pm U trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/LJ/Entry/Repost.pm =================================================================== --- trunk/cgi-bin/LJ/Entry/Repost.pm 2012-06-08 14:38:13 UTC (rev 22215) +++ trunk/cgi-bin/LJ/Entry/Repost.pm 2012-06-09 07:48:19 UTC (rev 22216) @@ -112,7 +112,8 @@ my $err = 0; my $flags = { 'noauth' => 1, 'use_custom_time' => 0, - 'u' => $u }; + 'u' => $u, + 'entryrepost' => 1, }; my %req = ( 'username' => $u->user, 'event' => LJ::Lang::ml('entry.reference.event_text', { 'url' => $url}), Modified: trunk/cgi-bin/LJ/Hooks/PingBack.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/PingBack.pm 2012-06-08 14:38:13 UTC (rev 22215) +++ trunk/cgi-bin/LJ/Hooks/PingBack.pm 2012-06-09 07:48:19 UTC (rev 22216) @@ -99,7 +99,11 @@ my $security = $args->{security}; my $entry = $args->{entry}; my $journal = $args->{journal}; - + my $repost = $args->{entryrepost}; # repost without pingback + + # if repost (fast) then pingpack is not need + return if $repost; + return unless LJ::PingBack->has_user_pingback($journal); # check security Modified: trunk/cgi-bin/TheSchwartz/Worker/NotifyPingbackServer.pm =================================================================== --- trunk/cgi-bin/TheSchwartz/Worker/NotifyPingbackServer.pm 2012-06-08 14:38:13 UTC (rev 22215) +++ trunk/cgi-bin/TheSchwartz/Worker/NotifyPingbackServer.pm 2012-06-09 07:48:19 UTC (rev 22216) @@ -37,7 +37,7 @@ my $target_entry = LJ::Entry->new_from_url($link->{uri}); next unless $target_entry; - next unless $target_entry->original_url; + next unless $target_entry->original_post; next unless LJ::PingBack->should_entry_recieve_pingback($target_entry); next unless log_ping($source_entry, $target_entry); Modified: trunk/cgi-bin/ljprotocol.pl =================================================================== --- trunk/cgi-bin/ljprotocol.pl 2012-06-08 14:38:13 UTC (rev 22215) +++ trunk/cgi-bin/ljprotocol.pl 2012-06-09 07:48:19 UTC (rev 22216) @@ -2893,6 +2893,7 @@ 'jobs' => \@jobs, # for hooks to push jobs onto 'req' => $req, 'res' => $res, + 'entryrepost' => $flags->{'entryrepost'}, }); # cluster tracking