]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WWW.pm
various internal documentation updates
[public-inbox.git] / lib / PublicInbox / WWW.pm
index 8f155063324bb715b786d719235451ba3f01ade6..d00dfe7cccee56ac296560d162fc196ca8f8e0ae 100644 (file)
@@ -1,6 +1,8 @@
-# Copyright (C) 2014, Eric Wong <normalperson@yhbt.net> and all contributors
+# Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 #
+# Main web interface for mailing list archives
+#
 # We focus on the lowest common denominators here:
 # - targeted at text-only console browsers (w3m, links, etc..)
 # - Only basic HTML, CSS only for line-wrapping <pre> text content for GUIs
@@ -130,11 +132,10 @@ sub get_index {
        my ($ctx) = @_;
        require PublicInbox::Feed;
        my $srch = searcher($ctx);
-       my $q = $ctx->{cgi}->param('q');
        footer($ctx);
-       if (defined $q) {
+       if (defined $ctx->{cgi}->param('q')) {
                require PublicInbox::SearchView;
-               PublicInbox::SearchView::sres_top_html($ctx, $q);
+               PublicInbox::SearchView::sres_top_html($ctx);
        } else {
                PublicInbox::Feed::generate_html_index($ctx);
        }
@@ -164,7 +165,7 @@ sub get_mid_txt {
        my ($ctx) = @_;
        my $x = mid2blob($ctx) or return r404($ctx);
        require PublicInbox::Mbox;
-       PublicInbox::Mbox::emit1($x);
+       PublicInbox::Mbox::emit1($ctx, $x);
 }
 
 # /$LISTNAME/$MESSAGE_ID/                   -> HTML content (short quotes)