Committer: akanashin
LJINT-482: Comments for side projects (letidor) - improvementsU trunk/cgi-bin/LJ/Entry.pm U trunk/cgi-bin/LJ/Talk/Post.pm U trunk/htdocs/gadgets/logcom.bml
Modified: trunk/cgi-bin/LJ/Entry.pm =================================================================== --- trunk/cgi-bin/LJ/Entry.pm 2012-09-14 14:15:04 UTC (rev 22899) +++ trunk/cgi-bin/LJ/Entry.pm 2012-09-17 10:35:29 UTC (rev 22900) @@ -2740,7 +2740,7 @@ # $value is amount to incr/decr, 1 by default sub replycount_do { - my ($u, $jitemid, $action, $value) = @_; + my ($u, $jitemid, $action, $value, $posterid) = @_; # check action name die "unknown action: $action" @@ -2764,7 +2764,7 @@ : sub { LJ::MemCache::incr($memkey, $value) }; my $entry = LJ::Entry->new( $u, 'jitemid' => $jitemid ); - LJ::run_hooks( 'replycount_change', $entry ); + LJ::run_hooks( 'replycount_change', $entry, $posterid ); ## my $sql_sign = $action eq 'decr' ? '-' : '+'; Modified: trunk/cgi-bin/LJ/Talk/Post.pm =================================================================== --- trunk/cgi-bin/LJ/Talk/Post.pm 2012-09-14 14:15:04 UTC (rev 22899) +++ trunk/cgi-bin/LJ/Talk/Post.pm 2012-09-17 10:35:29 UTC (rev 22900) @@ -197,7 +197,7 @@ # update the "replycount" summary field of the log table if ($comment->{state} eq 'A') { - LJ::replycount_do($journalu, $itemid, "incr"); + LJ::replycount_do($journalu, $itemid, "incr", 1, $posterid); } # update the "hasscreened" property of the log item if needed Modified: trunk/htdocs/gadgets/logcom.bml =================================================================== --- trunk/htdocs/gadgets/logcom.bml 2012-09-14 14:15:04 UTC (rev 22899) +++ trunk/htdocs/gadgets/logcom.bml 2012-09-17 10:35:29 UTC (rev 22900) @@ -15,6 +15,7 @@ my $api_key = LJ::Request->get_param('rsk'); my $domain = LJ::Request->get_param('domain'); my $type = LJ::Request->get_param('type'); + my $ditemid = LJ::Request->get_param('ditemid'); ## convert remote-site key to lj.com's community my $partner = LJ::PartnerSite->find_by_api_key($api_key); @@ -38,7 +39,7 @@ } ); - my $entry = $partner->find_entry_by_docid($docid); + my $entry = $partner->find_entry_by_docid($docid, {ditemid => $ditemid}); my $jitemid = $entry->jitemid; my $replyto = LJ::Request->get_param('replyto');