X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FSearchView.pm;h=4336e4d9b2d83ed289521450b0e958e0b1f762d0;hb=d0147582e289fdd4cdd84e91d8b0f8ae9c230124;hp=287b0a280575885f9c51678e80ed8b7ea277bc6d;hpb=815f07f300a4f1e95a50cba76bbff449fa653325;p=public-inbox.git diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 287b0a28..4336e4d9 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -6,7 +6,7 @@ package PublicInbox::SearchView; use strict; use warnings; use URI::Escape qw(uri_unescape uri_escape); -use PublicInbox::SearchMsg; +use PublicInbox::Smsg; use PublicInbox::Hval qw(ascii_html obfuscate_addrs mid_href); use PublicInbox::View; use PublicInbox::WwwAtomStream; @@ -100,7 +100,7 @@ sub mset_summary { foreach my $m ($mset->items) { my $rank = sprintf("%${pad}d", $m->get_rank + 1); my $pct = get_pct($m); - my $smsg = PublicInbox::SearchMsg::from_mitem($m, $srch); + my $smsg = PublicInbox::Smsg::from_mitem($m, $srch); unless ($smsg) { eval { $m = "$m ".$m->get_docid . " expired\n"; @@ -243,8 +243,8 @@ sub search_nav_bot { sub sort_relevance { [ sort { - (eval { $b->topmost->{smsg}->{pct} } // 0) <=> - (eval { $a->topmost->{smsg}->{pct} } // 0) + (eval { $b->topmost->{pct} } // 0) <=> + (eval { $a->topmost->{pct} } // 0) } @{$_[0]} ] } @@ -260,7 +260,7 @@ sub load_msgs { my ($mset) = @_; [ map { my $mi = $_; - my $smsg = PublicInbox::SearchMsg::from_mitem($mi); + my $smsg = PublicInbox::Smsg::from_mitem($mi); $smsg->{pct} = get_pct($mi); $smsg; } ($mset->items) ] @@ -338,7 +338,7 @@ sub adump_i { my ($ctx) = @_; while (my $mi = shift @{$ctx->{items}}) { my $smsg = eval { - PublicInbox::SearchMsg::from_mitem($mi, $ctx->{srch}); + PublicInbox::Smsg::from_mitem($mi, $ctx->{srch}); } or next; $ctx->{-inbox}->smsg_mime($smsg) and return $smsg; }