sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r12353: LJSUP-13092: Non-cyrillic users can't sw...

Committer: vtroitsky
LJSUP-13092: Non-cyrillic users can't switch to custom rating

U   trunk/cgi-bin/LJ/Widget/HomepageEN.pm
Modified: trunk/cgi-bin/LJ/Widget/HomepageEN.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/HomepageEN.pm	2012-07-25 16:11:48 UTC (rev 12352)
+++ trunk/cgi-bin/LJ/Widget/HomepageEN.pm	2012-07-25 16:12:39 UTC (rev 12353)
@@ -148,6 +148,7 @@
         LJ::Widget::ExtBlock->render(id=>'homepage.gazeta') : '';
 
     ## Ratings
+    {
     #    $result{personalstats} = LJ::PersonalStats->get_result_html($remote, { widget => 1, unique_journals => 1, rating_country => $GET->{rating}, length => 25 }, '/ratings/posts/', { homepage => 1 });
 
         my $rating_top_journals_sort = LJ::Request->cookie('rating_top_journals_sort');
@@ -209,11 +210,15 @@
             'rating_show_custom' => $rating_show_custom,
         } );
 
+        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);
 
-    ## Widget RatingTop10
-    $result{widget_ratingtop10_comms} = LJ::Widget::RatingTopJournals->render(what => 'communities', country => 'noncyr');
+        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;
 
+    }
     ## Widget SUP1MillionPromo
     $result{widget_sup1millionpromo} = LJ::Widget::SUP1MillionPromo->render;
 

Tags: ljcom, pm, sunnyman, vtroitsky
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