diff options
author | Eric Wong <e@80x24.org> | 2016-06-20 00:57:16 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-20 00:57:38 +0000 |
commit | 4b313dc74bc9bb84a542b7ec920cdb92879e7523 (patch) | |
tree | bdea400b15979d0d4206aa8aa840c71ed956eaca /lib/PublicInbox/WWW.pm | |
parent | 2724361ab69cd071c970c66e076784c582c76e42 (diff) | |
download | public-inbox-4b313dc74bc9bb84a542b7ec920cdb92879e7523.tar.gz |
Favor Inbox objects as our primary source of truth to simplify our code. This increases our coupling with PSGI to make it easier to write tests in the future. A lot of this code was originally designed to be usable standalone without PSGI or CGI at all; but that might increase development effort.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index f88894a0..f1f4abd5 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -206,9 +206,7 @@ sub get_index { # just returns a string ref for the blob in the current ctx sub mid2blob { my ($ctx) = @_; - require PublicInbox::MID; - my $path = PublicInbox::MID::mid2path($ctx->{mid}); - $ctx->{git}->cat_file("HEAD:$path"); + $ctx->{-inbox}->msg_by_mid($ctx->{mid}); } # /$INBOX/$MESSAGE_ID/raw -> raw mbox |