Первый фоллен на хелле (wildkin) wrote in changelog,
Первый фоллен на хелле
wildkin
changelog

[ljcom] r12323: LJSUP-11266: Users should be able to adj...

Committer: dnikolaev
LJSUP-11266: Users should be able to adjust rating (disable users and entries)

U   trunk/cgi-bin/LJ/Widget/HomepageRU.pm
Modified: trunk/cgi-bin/LJ/Widget/HomepageRU.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/HomepageRU.pm	2012-07-19 13:58:46 UTC (rev 12322)
+++ trunk/cgi-bin/LJ/Widget/HomepageRU.pm	2012-07-20 08:20:05 UTC (rev 12323)
@@ -157,15 +157,17 @@
             }
         }
 
+        # TODO: when !$rating_show_custom use LJ::PersonalStats::Ratings::Posts::Segment('offset' => 0, 'length' => 25)
         my $entries_top = LJ::PersonalStats::Ratings::Posts::Top->new( {
             # 'country'         => STRING (cyr | noncyr | ua)
             'sort'             => 'visitors',
             'length'           => 25,
-            'filter_commpromo' => 1,
-            'filter_selfpromo' => 1,
+            ( $rating_show_custom ? ('length_reserve' => 100) : () ),
+            'filter_commpromo' => ( $rating_show_custom ? 0 : 1 ),
+            'filter_selfpromo' => ( $rating_show_custom ? 0 : 1 ),
             'filter_featured'  => 0,
-            'filter_blacklist' => $rating_show_custom,
-            'unique_journals'  => !$rating_show_custom,
+            'filter_blacklist' => 0,
+            'unique_journals'  => ( $rating_show_custom ? 0 : 1 ),
         } );
 
         $result{personalstats} = $entries_top->template_output( {

Tags: dnikolaev, ljcom, pm, wildkin
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