]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
www: support listing of inboxes
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 0d28dd04023e95338e456c8ac2f7403f71bcca12..286555f65cb3b4c8f4a7820b0489e4f6f6005e72 100644 (file)
@@ -95,6 +95,15 @@ sub new {
        if (defined $dir && -f "$dir/inbox.lock") {
                $opts->{version} = 2;
        }
+
+       # allow any combination of multi-line or comma-delimited hide entries
+       my $hide = {};
+       if (defined(my $h = $opts->{hide})) {
+               foreach my $v (@$h) {
+                       $hide->{$_} = 1 foreach (split(/\s*,\s*/, $v));
+               }
+               $opts->{-hide} = $hide;
+       }
        bless $opts, $class;
 }