holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[ljcom] r12319: LJSUP-13036: Create subroutine for get s...

Committer: akanashin
LJSUP-13036: Create subroutine for get social capital by user
U   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", {

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