about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-15 01:18:07 +0000
committerEric Wong <e@80x24.org>2019-05-15 01:18:52 +0000
commit70caf43a131fc5bdf7104f82f2acee9d5353d6a8 (patch)
tree54691cbe7b16adf0fd8406d2a3a514bbd19741ce /lib/PublicInbox/Feed.pm
parente981538130dd6d285392f4316328edbadab0d330 (diff)
downloadpublic-inbox-70caf43a131fc5bdf7104f82f2acee9d5353d6a8.tar.gz
www: use Inbox->over where appropriate
We don't need to rely on Xapian search functionality for the
majority of the WWW code, even.  subject_normalized is moved to
SearchMsg, where it (probably) makes more sense, anyways.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index b373a1eb..a04838a1 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -27,10 +27,10 @@ sub generate {
 sub generate_thread_atom {
         my ($ctx) = @_;
         my $mid = $ctx->{mid};
-        my $msgs = $ctx->{srch}->get_thread($mid);
+        my $ibx = $ctx->{-inbox};
+        my $msgs = $ibx->over->get_thread($mid);
         return _no_thread() unless @$msgs;
 
-        my $ibx = $ctx->{-inbox};
         my $html_url = $ibx->base_url($ctx->{env});
         $html_url .= PublicInbox::Hval->new_msgid($mid)->{href};
         $ctx->{-html_url} = $html_url;
@@ -46,12 +46,13 @@ sub generate_html_index {
         # if the 'r' query parameter is given, it is a legacy permalink
         # which we must continue supporting:
         my $qp = $ctx->{qp};
-        if ($qp && !$qp->{r} && $ctx->{srch}) {
+        my $ibx = $ctx->{-inbox};
+        if ($qp && !$qp->{r} && $ibx->over) {
                 return PublicInbox::View::index_topics($ctx);
         }
 
         my $env = $ctx->{env};
-        my $url = $ctx->{-inbox}->base_url($env) . 'new.html';
+        my $url = $ibx->base_url($env) . 'new.html';
         my $qs = $env->{QUERY_STRING};
         $url .= "?$qs" if $qs ne '';
         [302, [ 'Location', $url, 'Content-Type', 'text/plain'],
@@ -94,7 +95,7 @@ sub recent_msgs {
         if ($v > 2) {
                 die "BUG: unsupported inbox version: $v\n";
         }
-        if (my $srch = $ibx->search) {
+        if ($ibx->over) {
                 return PublicInbox::View::paginate_recent($ctx, $max);
         }