diff options
author | Eric Wong <e@yhbt.net> | 2020-03-20 08:18:20 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-22 09:00:23 +0000 |
commit | b5bc3576af3d0ef0fa884ed32a674c7a703a19b2 (patch) | |
tree | 990be6a2a7f0440154e7aa903cd430a2735eb975 /lib/PublicInbox/OverIdx.pm | |
parent | 99d6d24847c499387ce65b09305deebfd51f8930 (diff) | |
download | public-inbox-b5bc3576af3d0ef0fa884ed32a674c7a703a19b2.tar.gz |
We can finally get rid of the awkward, ad-hoc use of V2Writable, SearchIdx, and OverIdx args for passing {cotime} and {autime} between classes. We'll still use those git time fields internally within V2Writable and SearchIdx for (re)indexing, but that's not worth avoiding as a fallback.
Diffstat (limited to 'lib/PublicInbox/OverIdx.pm')
-rw-r--r-- | lib/PublicInbox/OverIdx.pm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm index 2d71956d..acbf2c8d 100644 --- a/lib/PublicInbox/OverIdx.pm +++ b/lib/PublicInbox/OverIdx.pm @@ -15,7 +15,6 @@ use IO::Handle; use DBI qw(:sql_types); # SQL_BLOB use PublicInbox::MID qw/id_compress mids_for_index references/; use PublicInbox::Smsg qw(subject_normalized); -use PublicInbox::MsgTime qw(msg_timestamp msg_datestamp); use Compress::Zlib qw(compress); use PublicInbox::Search; @@ -245,7 +244,7 @@ sub subject_path ($) { } sub add_overview { - my ($self, $mime, $smsg, $times) = @_; + my ($self, $mime, $smsg) = @_; $smsg->{lines} = $mime->body_raw =~ tr!\n!\n!; $smsg->{mime} = $mime; # XXX temporary? my $hdr = $mime->header_obj; @@ -260,10 +259,7 @@ sub add_overview { my $dd = $smsg->to_doc_data; utf8::encode($dd); $dd = compress($dd); - my $ds = msg_timestamp($hdr, $times->{autime}); - my $ts = msg_datestamp($hdr, $times->{cotime}); - my $values = [ $ts, $ds, $smsg->{num}, $mids, $refs, $xpath, $dd ]; - add_over($self, $values); + add_over($self, [ @$smsg{qw(ts ds num)}, $mids, $refs, $xpath, $dd ]); } sub add_over { |