Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[ljcom] r12657: LJSUP-12998: If user removes another use...

Committer: amyshkin
LJSUP-12998: If user removes another user from rating he should be removed from 24h rating (from homepage only)
U   trunk/cgi-bin/LJ/Widget/HomepageEN.pm
U   trunk/cgi-bin/LJ/Widget/HomepageRU.pm
Modified: trunk/cgi-bin/LJ/Widget/HomepageEN.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/HomepageEN.pm	2012-09-17 14:31:48 UTC (rev 12656)
+++ trunk/cgi-bin/LJ/Widget/HomepageEN.pm	2012-09-17 14:41:53 UTC (rev 12657)
@@ -214,7 +214,13 @@
         my $output = {};
 
         ## Widget RatingTop10
-        $result{widget_ratingtop10_comms} = LJ::Widget::RatingTopJournals->render(what => 'communities', country => 'noncyr', 'sort' => $rating_top_journals_sort, 'filter_blacklist' => $rating_show_custom, output => $output);
+        $result{widget_ratingtop10_comms} = LJ::Widget::RatingTopJournals->render(
+            'what'             => 'communities',
+            'country'          => 'noncyr',
+            'sort'             => $rating_top_journals_sort,
+            'filter_blacklist' => $rating_top_journals_sort eq 'visitors',
+            'output'           => $output,
+        );
 
         LJ::Request->set_cookie('rating_full' => !$rating_show_custom, 'expires' => time + 60*60*24*180) if $set_rating_cookie;
         LJ::Request->set_cookie('rating_top_journals_sort' => $output->{'sort'}, 'expires' => time + 60*60*24*180) if $set_sort_cookie;

Modified: trunk/cgi-bin/LJ/Widget/HomepageRU.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/HomepageRU.pm	2012-09-17 14:31:48 UTC (rev 12656)
+++ trunk/cgi-bin/LJ/Widget/HomepageRU.pm	2012-09-17 14:41:53 UTC (rev 12657)
@@ -197,14 +197,14 @@
             'what'             => 'users',
             'sort'             => $rating_top_journals_sort,
             # 'country'          => ???, # do not define 'country', use default value
-            'filter_blacklist' => $rating_show_custom,
+            'filter_blacklist' => $rating_top_journals_sort eq 'visitors',
             'output'           => $output,
         );
 
         $result{widget_ratingtop10_comms} = LJ::Widget::RatingTopJournals->render(
             'what'             => 'communities',
             'sort'             => $rating_top_journals_sort,
-            'filter_blacklist' => $rating_show_custom,
+            'filter_blacklist' => $rating_top_journals_sort eq 'visitors',
             'output'           => $output,
         );
 

Tags: amyshkin, ljcom, pm, zilogic
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