about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-05-02 03:20:22 +0000
committerEric Wong <e@80x24.org>2016-05-02 17:57:07 +0000
commit16d1d110117a2521fcc3304541c937385febd66b (patch)
treefa69aa37cc5ab1fd2eac4b089cc4e838fcb55bb5 /lib/PublicInbox/View.pm
parent98e024acdb909cd9754ed5f107a0063350c103dd (diff)
downloadpublic-inbox-16d1d110117a2521fcc3304541c937385febd66b.tar.gz
Broken threads should be exposed to hopefully encourage people to
use proper mail clients which set In-Reply-To headers.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 63810dcb..70eb44e5 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -670,21 +670,11 @@ sub msg_timestamp {
 }
 
 sub thread_results {
-        my ($msgs, $nosubject, $nosort) = @_;
+        my ($msgs) = @_;
         require PublicInbox::Thread;
         my $th = PublicInbox::Thread->new(@$msgs);
-
-        # WARNING! both these Mail::Thread knobs were found by inspecting
-        # the Mail::Thread 2.55 source code, and we have some monkey patches
-        # in PublicInbox::Thread to fix memory leaks.  Since Mail::Thread
-        # appears unmaintained, I suppose it's safe to depend on these
-        # variables for now:
-        no warnings 'once';
-        $Mail::Thread::nosubject = $nosubject;
-        # Keep ghosts with only a single direct child:
-        $Mail::Thread::noprune = 1;
         $th->thread;
-        $th->order(*sort_ts) unless $nosort;
+        $th->order(*sort_ts);
         $th
 }
 
@@ -879,7 +869,7 @@ sub emit_index_topics {
                 my $sres = $state->{srch}->query('', \%opts);
                 my $nr = scalar @{$sres->{msgs}} or last;
 
-                for (thread_results(load_results($sres), 1)->rootset) {
+                for (thread_results(load_results($sres))->rootset) {
                         add_topic($state, $_, 0);
                 }
                 $opts{offset} += $nr;