} elsif ($path_info =~ m!$LISTNAME_RE/$MID_RE/$END_RE\z!o) {
msg_page($ctx, $1, $2, $3);
+ # in case people leave off the trailing slash:
+ } elsif ($path_info =~ m!$LISTNAME_RE/$MID_RE/(f|T|t)\z!o) {
+ r301($ctx, $1, $2, $3 eq 't' ? 't/#u' : $3);
+
# convenience redirects order matters
} elsif ($path_info =~ m!$LISTNAME_RE/([^/]{2,})\z!o) {
r301($ctx, $1, $2);
eval {
require PublicInbox::Search;
+ require PublicInbox::SearchView;
require PublicInbox::Mbox;
require IO::Compress::Gzip;
};
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
} elsif ($path_info =~ m!$LISTNAME_RE/(\S+/\S+)/$END_RE\z!o) {
msg_page($ctx, $1, $2, $3);
+ # in case people leave off the trailing slash:
+ } elsif ($path_info =~ m!$LISTNAME_RE/(\S+/\S+)/(f|T|t)\z!o) {
+ r301($ctx, $1, $2, $3 eq 't' ? 't/#u' : $3);
} else {
r404();
}