]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
thread: remove Mail::Thread dependency
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index 3623a78b4406e1d90bad1d4b46c536c60c85b0f5..da31109357a0a579fa5c6aa04cb1bf2d1a59c4c1 100644 (file)
@@ -11,7 +11,7 @@ use PublicInbox::View;
 use PublicInbox::MID qw(mid2path mid_mime mid_clean mid_escape);
 use Email::MIME;
 require PublicInbox::Git;
-require PublicInbox::Thread;
+require PublicInbox::SearchThread;
 our $LIM = 50;
 
 sub noop {}
@@ -85,12 +85,11 @@ sub mset_summary {
 
 sub err_txt {
        my ($ctx, $err) = @_;
-       my $u = '//xapian.org/docs/queryparser.html';
-       $u = PublicInbox::Hval::prurl($ctx->{env}, $u);
+       my $u = $ctx->{-inbox}->base_url($ctx->{env}) . '_/text/help/';
        $err =~ s/^\s*Exception:\s*//; # bad word to show users :P
        $err = ascii_html($err);
        "\nBad query: <b>$err</b>\n" .
-               qq{See <a\nhref="$u">$u</a> for Xapian query syntax};
+               qq{See <a\nhref="$u">$u</a> for help on using search};
 }
 
 sub search_nav_top {
@@ -153,7 +152,7 @@ sub mset_thread {
                $m;
        } ($mset->items);
 
-       my $th = PublicInbox::Thread->new(@m);
+       my $th = PublicInbox::SearchThread->new(\@m);
        $th->thread;
        if ($q->{r}) { # order by relevance
                $th->order(sub {