my $desc = ascii_html($ce->{description} //= $ibx->description);
my $ts = fmt_ts($ce->{-modified} //= $ibx->modified);
my ($url, $href);
- if (defined($ibx->{url})) {
+ if (scalar(@{$ibx->{url} // []})) {
$url = $href = ascii_html(prurl($ctx->{env}, $ibx->{url}));
} else {
$href = ascii_html(uri_escape_utf8($ibx->{name})) . '/';
return if $section !~ m!\Apublicinbox\.([^/]+)\z!;
my $ibx = $cfg->lookup_name($1) or return;
if (!$ibx->{-hide}->{$ctx->hide_key} &&
- grep(/$re/, @{$ibx->{url}})) {
+ grep(/$re/, @{$ibx->{url} // []})) {
$ctx->ibx_entry($ibx);
}
} else { # undef == "EOF"
delete $ctx->{-list}; # reset if retried
my $pi_cfg = $ctx->{www}->{pi_cfg};
- if (defined(my $user_query = $q->{'q'})) {
+ my $user_query = $q->{'q'} // '';
+ if ($user_query =~ /\S/) {
$qs = "( $qs ) AND ( $user_query )";
} else { # special case for ALL
$ctx->ibx_entry($pi_cfg->ALL // die('BUG: ->ALL expected'), {});
$gzf->zmore('<pre>');
$gzf->zmore(join("\n", @$list));
$gzf->zmore(mset_footer($ctx, $mset)) if $mset;
+ } elsif (my $mset = delete $ctx->{-mset}) {
+ $gzf->zmore(mset_nav_top($ctx, $mset));
+ $gzf->zmore('<pre>no matching inboxes');
+ $gzf->zmore(mset_footer($ctx, $mset));
} else {
$gzf->zmore('<pre>no inboxes, yet');
}