Committer: akanashin
LJSUP-12319: We need to display social capital for users which turn off RatingsU trunk/htdocs/tools/endpoints/ctxpopup.bml
Modified: trunk/htdocs/tools/endpoints/ctxpopup.bml =================================================================== --- trunk/htdocs/tools/endpoints/ctxpopup.bml 2012-05-30 06:43:11 UTC (rev 22103) +++ trunk/htdocs/tools/endpoints/ctxpopup.bml 2012-05-30 07:20:50 UTC (rev 22104) @@ -120,10 +120,16 @@ } if ($u && ($u->is_personal || $u->is_comm)) { - my ($position, $first, $soc_capital); + my ($position, $first, $soc_capital, %filter); if ( $u->journaltype eq 'C' || LJ::SUP->is_sup_enabled($u)) { + my $country = LJ::GeoLocation->get_country_info_by_ip; + $country = $u->prop('country') if $u && $country ne 'UA'; + if ($country eq 'UA') { + $filter{filter} = 'UA'; + } + $position = LJ::PersonalStats::DB->fetch_raw('ratings', { func => 'get_value', what => $u->journaltype eq 'C' ? 'communities' : 'users', @@ -131,6 +137,7 @@ by => 'friends_weight', type => 0, sup => LJ::SUP->is_sup_enabled($u) ? 1 : 0, + %filter, }); $soc_capital = LJ::PersonalStats::DB->fetch_raw('ratings', {