diff options
author | Eric Wong <e@80x24.org> | 2015-09-05 02:52:47 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-05 03:02:35 +0000 |
commit | 1e7fe3de7021427f8326a5f7710347035f7a63c5 (patch) | |
tree | a536b46fafda4b1347b5907bf1dd795bfd37d76d /lib/PublicInbox/WWW.pm | |
parent | 68d0ef45113ad2761e4f065250f329a5f52eb5f0 (diff) | |
download | public-inbox-1e7fe3de7021427f8326a5f7710347035f7a63c5.tar.gz |
This hopefully makes it easier to find things without resorting to proprietary external services.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 5584e49b..2718854c 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -67,6 +67,7 @@ sub preload { eval { require PublicInbox::Search; + require PublicInbox::SearchView; require PublicInbox::Mbox; require IO::Compress::Gzip; }; @@ -128,8 +129,14 @@ sub get_index { my ($ctx) = @_; require PublicInbox::Feed; my $srch = searcher($ctx); + my $q = $ctx->{cgi}->param('q'); footer($ctx); - PublicInbox::Feed::generate_html_index($ctx); + if (defined $q) { + require PublicInbox::SearchView; + PublicInbox::SearchView::sres_top_html($ctx, $q); + } else { + PublicInbox::Feed::generate_html_index($ctx); + } } # just returns a string ref for the blob in the current ctx |