Merged MAPS2.0
[clearscm.git] / maps / bin / display.cgi
index 55d31f8..0a0cfcd 100755 (executable)
@@ -19,6 +19,7 @@ use FindBin;
 local $0 = $FindBin::Script;
 
 use lib "$FindBin::Bin/../lib";
+use lib "$FindBin::Bin/../../lib";
 
 use MAPS;
 use MAPSWeb;
@@ -83,6 +84,8 @@ sub Body($) {
 
   my $parser = MIME::Parser->new();
 
+  # For some strange reason MIME::Parser has started having some problems
+  # with writing out tmp files...
   $parser->output_to_core(1);
   $parser->tmp_to_core(1);
 
@@ -169,7 +172,7 @@ sub Body($) {
             # There should be an easier way to get this but I couldn't find one.
             my $encoding = ${$subpart->{mail_inet_head}{mail_hdr_hash}{'Content-Transfer-Encoding'}[0]};
             if ($encoding =~ /base64/) {
-              $subpart->bodayhandle->print;
+              $subpart->bodyhandle->print;
             } else {
               print $subpart->print_body;
             } # if