From b5bc3576af3d0ef0fa884ed32a674c7a703a19b2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 20 Mar 2020 08:18:20 +0000 Subject: *idx: pass smsg in even more places 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. --- lib/PublicInbox/OverIdx.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/PublicInbox/OverIdx.pm') 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 { -- cgit v1.2.3-24-ge0c7