Committer: vsukhanov
LJSV-1190: Poster's Pingback preferences have more priority than Communities have.we should not send pingback if user disabled it sending and receiving.
U trunk/cgi-bin/LJ/Hooks/PingBack.pm U trunk/cgi-bin/LJ/PingBack.pm
Modified: trunk/cgi-bin/LJ/Hooks/PingBack.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/PingBack.pm 2010-09-09 10:57:29 UTC (rev 17328) +++ trunk/cgi-bin/LJ/Hooks/PingBack.pm 2010-09-09 11:02:38 UTC (rev 17329) @@ -119,7 +119,9 @@ return if $prop_pingback eq 'D' # pingback is strictly disabled or not $prop_pingback; # or not enabled. =cut - my $prop_pingback = 'O'; # Open + + my $poster = $entry->poster; + my $prop_pingback = $poster ? $poster->prop('pingback') : 'O'; # LJ::PingBack->notify( uri => $entry->url, Modified: trunk/cgi-bin/LJ/PingBack.pm =================================================================== --- trunk/cgi-bin/LJ/PingBack.pm 2010-09-09 10:57:29 UTC (rev 17328) +++ trunk/cgi-bin/LJ/PingBack.pm 2010-09-09 11:02:38 UTC (rev 17329) @@ -89,8 +89,8 @@ # are comments allowed? return 0 unless $target_entry->posting_comments_allowed; - # user can disable recieving pingback for entire journa for entire journall - return 0 if $target_entry->journal->prop("pingback") eq 'D'; + # Poster's preferences have more priority than Communities have. + return 0 if $target_entry->poster->prop("pingback") eq 'D'; =head # did user allow to add pingbacks? @@ -121,7 +121,7 @@ my $uri = $args{uri}; my $mode = $args{mode}; - # return unless $mode =~ m!^[LO]$!; # (L)ivejournal only, (O)pen. + return unless $mode =~ m!^[LO]$!; # (L)ivejournal only, (O)pen. my $sclient = LJ::theschwartz(); unless ($sclient){