lib/PublicInbox/SearchView.pm | 8 ++++---- lib/PublicInbox/View.pm | 16 ++++++++-------- diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 828926c721790b2e9ad3176e6f7284c69eb2b873..7e508bb7764238bfcc4958ecfcc131c08108f514 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -108,14 +108,14 @@ $ctx->{env}->{'psgi.errors'}->print($m); }; next; } - my $s = ascii_html($smsg->subject); - my $f = ascii_html($smsg->from_name); + my $s = ascii_html($smsg->{subject}); + my $f = ascii_html($smsg->{from_name}); if ($obfs_ibx) { obfuscate_addrs($obfs_ibx, $s); obfuscate_addrs($obfs_ibx, $f); } - my $date = PublicInbox::View::fmt_ts($smsg->ds); - my $mid = PublicInbox::Hval->new_msgid($smsg->mid)->{href}; + my $date = PublicInbox::View::fmt_ts($smsg->{ds}); + my $mid = PublicInbox::Hval->new_msgid($smsg->{mid})->{href}; $s = '(no subject)' if $s eq ''; $$res .= qq{$rank. }. $s . "\n"; diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index e586b068fce8fdd643ba5de61505fbee7582fc1b..033a0c14b05d0dcb427ff5732c0a282c4ab7b5f5 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -84,7 +84,7 @@ $smsg = $ibx->smsg_mime($smsg); my $next = $ibx->over->next_by_mid($ctx->{mid}, \$id, \$prev); $ctx->{more} = $next ? [ $id, $prev, $next ] : undef; return '' unless $smsg; - $ctx->{mhref} = '../' . mid_escape($smsg->mid) . '/'; + $ctx->{mhref} = '../' . mid_escape($smsg->{mid}) . '/'; my $mime = delete $smsg->{mime}; _msg_page_prepare_obuf($mime->header_obj, $ctx, $nr); multipart_text_as_html($mime, $ctx); @@ -423,7 +423,7 @@ } return missing_thread($ctx) unless $smsg; $ctx->{-obfs_ibx} = $ibx->{obfuscate} ? $ibx : undef; - $ctx->{-title_html} = ascii_html($smsg->subject); + $ctx->{-title_html} = ascii_html($smsg->{subject}); $ctx->{-html_tip} = thread_index_entry($ctx, $level, $smsg); $ctx->{-queue} = \@q; PublicInbox::WwwStream->response($ctx, 200, \&stream_thread_i); @@ -469,7 +469,7 @@ while (my $m = shift @$msgs) { $smsg = $ibx->smsg_mime($m) and last; } return missing_thread($ctx) unless $smsg; - $ctx->{-title_html} = ascii_html($smsg->subject); + $ctx->{-title_html} = ascii_html($smsg->{subject}); $ctx->{-html_tip} = '
'.index_entry($smsg, $ctx, scalar @$msgs);
 	$ctx->{msgs} = $msgs;
 	PublicInbox::WwwStream->response($ctx, 200, \&thread_html_i);
@@ -932,7 +932,7 @@ 	if ($level == 0 && $ctx->{skel_dump_roots}++) {
 		$$skel .= delete($ctx->{sl_note}) || '';
 	}
 
-	my $f = ascii_html($smsg->from_name);
+	my $f = ascii_html($smsg->{from_name});
 	my $obfs_ibx = $ctx->{-obfs_ibx};
 	obfuscate_addrs($obfs_ibx, $f) if $obfs_ibx;
 
@@ -971,7 +971,7 @@
 	# Subject is never undef, this mail was loaded from
 	# our Xapian which would've resulted in '' if it were
 	# really missing (and Filter rejects empty subjects)
-	my @subj = split(/ /, subject_normalized($smsg->subject));
+	my @subj = split(/ /, subject_normalized($smsg->{subject}));
 	# remove common suffixes from the subject if it matches the previous,
 	# so we do not show redundant text at the end.
 	my $prev_subj = $ctx->{prev_subj} || [];
@@ -1029,8 +1029,8 @@ }
 
 sub sort_ds {
 	[ sort {
-		(eval { $a->topmost->{smsg}->ds } || 0) <=>
-		(eval { $b->topmost->{smsg}->ds } || 0)
+		(eval { $a->topmost->{smsg}->{ds} } || 0) <=>
+		(eval { $b->topmost->{smsg}->{ds} } || 0)
 	} @{$_[0]} ];
 }
 
@@ -1041,7 +1041,7 @@ 	my ($ctx, $level, $node) = @_;
 	my $mid = $node->{id};
 	my $smsg = $node->{smsg} // $ctx->{-inbox}->smsg_by_mid($mid);
 	if ($smsg) {
-		my $subj = subject_normalized($smsg->subject);
+		my $subj = subject_normalized($smsg->{subject});
 		$subj = '(no subject)' if $subj eq '';
 		my $ds = $smsg->{ds};
 		if ($level == 0) { # new, top-level topic