changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[livejournal] r17309: LJSUP-6748 Filter friends page

Committer: aurbanowich
LJSUP-6748 Filter friends page

U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2010-09-08 18:34:10 UTC (rev 17308)
+++ trunk/cgi-bin/ljprotocol.pl	2010-09-09 02:53:54 UTC (rev 17309)
@@ -391,14 +391,20 @@
         $before_skip = $skip + 0;
         $skip = 0;
     }
-    
+
+    my %get_params = (
+        u          => $u,
+        userid     => $u->{'userid'},
+        remote     => $u,
+        dateformat => 'S2',
+        itemshow   => $itemshow,
+        filter     => $req->{groupmask},
+        showtypes  => $req->{journaltype},
+    );
+
     my @entries = LJ::get_friend_items({
-        'u' => $u,
-        'userid' => $u->{'userid'},
-        'remote' => $u,
-        'itemshow' => $itemshow,
+        %get_params,
         'skip' => $skip,
-        'dateformat' => 'S2',
     });
 
     my @attrs = qw/subject_raw event_raw journalid posterid ditemid security reply_count userpic props security/;
@@ -423,12 +429,8 @@
         if($before) {
             last if @res >= $itemshow;
             push @entries, LJ::get_friend_items({
-                'u' => $u,
-                'userid' => $u->{'userid'},
-                'remote' => $u,
-                'itemshow' => $itemshow,
+                %get_params,
                 'skip' => $skip + ($before_count += $itemshow),
-                'dateformat' => 'S2',
             }) unless @entries;
             next if $LJ::EndOfTime - $ei->{rlogtime} > $before;
             next if $before_skip-- > 0;
@@ -493,6 +495,7 @@
     };
 }
 
+
 sub getinbox
 {
     my ($req, $err, $flags) = @_;

Tags: fortl, livejournal, pl
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