Committer: akanashin
LJSUP-13036: Create subroutine for get social capital by userU trunk/cgi-bin/ljcom.pl
Modified: trunk/cgi-bin/ljcom.pl =================================================================== --- trunk/cgi-bin/ljcom.pl 2012-07-19 12:43:05 UTC (rev 12318) +++ trunk/cgi-bin/ljcom.pl 2012-07-19 12:51:39 UTC (rev 12319) @@ -1093,11 +1093,7 @@ } ## Display latest entries only from users with social capital more than 10 - my $position = LJ::PersonalStats::DB->fetch_raw('ratings', { func => 'get_authority', journal_id => $up->{'userid'}}); - my $soc_capital = 0; - if (ref $position eq 'HASH') { - $soc_capital = int($position->{result}->{authority}/1000); - } + my $soc_capital = $up->get_social_capital(); if ($soc_capital > 10) { push @$joblist, TheSchwartz::Job->new_from_array("LJ::Worker::LatestPosts", {