wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r20113: LJSUP-9745: Problem with search when I u...

Committer: gprochaev
LJSUP-9745: Problem with search when I use filter for journal where I created entry

U   trunk/htdocs/editjournal.bml
Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-09-22 08:56:16 UTC (rev 20112)
+++ trunk/htdocs/editjournal.bml	2011-09-22 09:37:08 UTC (rev 20113)
@@ -643,6 +643,7 @@
         my $ymd = join "/", ($year, $month, $day);
         my %ymd_req = ($year && $month && $day && $show ne 'recent') ? ( ymd => $ymd ) : ();
         my @post_ids = sort { $b <=> $a } ($usejournal_u ? $usejournal_u->get_post_ids : $remote->get_post_ids);
+        $only_me_checked = 1 unless $remote->can_manage ($usejournal_u);
         while ($usejournal_u && ($LJ::MAX_SCROLLBACK_LASTN = 50000,
             my @recent = LJ::get_recent_items({
                 itemshow  => $items_per_page,
@@ -666,17 +667,6 @@
                 $entry_ids{$item->{'itemid'}} = 1;
             }
 
-            ## Filter records uneditable for remote user
-            @recent = grep {
-                my $entry = LJ::Entry->new_from_item_hash ($usejournal_u, $_);
-                my $poster = $entry->poster;
-                if ($poster eq $remote || $remote->can_manage ($usejournal_u)) {
-                    1;
-                } else {
-                    0;
-                }
-            } @recent;
-
             push @recent_entries, @recent;
 
             my @temp_sort = sort { $a->{itemid} <=> $b->{itemid} } @recent_entries;
@@ -685,6 +675,8 @@
             if (@recent_entries == $items_per_page) {
                 last;
             }
+
+            $start_from += $items_per_page;
         }
 
         $ret .= $entry_chooser->(\@recent_entries, prev => $post_ids[0] >= $prev_page_id ? $prev_page_id : 0, 'next' => @recent_entries >= $items_per_page ? $start_from : 0);

Tags: bml, livejournal, wisest-owl
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