holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22070: LJSUP-12319: We need to display social c...

Committer: akanashin
LJSUP-12319: We need to display social capital for users which turn off Ratings
U   trunk/htdocs/userinfo.bml
Modified: trunk/htdocs/userinfo.bml
===================================================================
--- trunk/htdocs/userinfo.bml	2012-05-25 13:43:19 UTC (rev 22069)
+++ trunk/htdocs/userinfo.bml	2012-05-25 13:51:06 UTC (rev 22070)
@@ -695,7 +695,7 @@
         if (ref $position eq 'HASH' && ( $u->journaltype eq 'C' || LJ::SUP->is_sup_enabled($u) )) {
                 $soc_image = "<img src='$LJ::IMGPREFIX/profile_icons/" . ($position->{result}->{position}!=0 ? 'social-capital.png?v=17298' : 'korona.png?v=17319') . "'/>";
                 $soc_capital = LJ::PersonalStats::DB->fetch_raw('ratings', {func => 'get_authority', journal_id => $u->userid}); 
-                $soc_capital = int($position->{result}->{authority}/1000);
+                $soc_capital = int($soc_capital->{result}->{authority}/1000);
                 $soc_capital = $soc_capital < 10 ? ' <10 ' : LJ::commafy($soc_capital);
                 my $country  = LJ::SUP->is_sup_enabled($u) ? 'cyr' : 'noncyr';
                 $body .= "<li class='rating-place'>" .
@@ -708,7 +708,7 @@
         if (ref $ua_position eq 'HASH') {
                 $soc_image = "<img src='$LJ::IMGPREFIX/profile_icons/" . ($ua_position->{result}->{position}!=0 ? 'social-capital.png?v=17298' : 'korona.png?v=17319') . "'/>";
                 $soc_capital = LJ::PersonalStats::DB->fetch_raw('ratings', {func => 'get_authority', journal_id => $u->userid}); 
-                $soc_capital = int($position->{result}->{authority}/1000);
+                $soc_capital = int($soc_capital->{result}->{authority}/1000);
                 $soc_capital = $soc_capital < 10 ? ' <10 ' : LJ::commafy($soc_capital);
                 $body .= "<li class='rating-place'>" .
                          $diagram_image .

Tags: akanashin, bml, holyandrew, livejournal
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