From e26523a1f6d9faeb0634192128875630c4581f95 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Sat, 26 Dec 1998 18:17:44 +0000 Subject: [PATCH] Current Archive -> Archive Support to read the current mail archive from hub --- en/cgi/getmsg.cgi | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/en/cgi/getmsg.cgi b/en/cgi/getmsg.cgi index 3dde7b37e4..8e0d382a0e 100755 --- a/en/cgi/getmsg.cgi +++ b/en/cgi/getmsg.cgi @@ -6,7 +6,7 @@ # by John Fieber # February 26, 1998 # -# $Id: getmsg.cgi,v 1.16 1998-08-03 15:37:47 wosch Exp $ +# $Id: getmsg.cgi,v 1.17 1998-12-26 18:17:44 wosch Exp $ # require "./cgi-lib.pl"; @@ -40,11 +40,25 @@ sub Fetch $file =~ s/\.\.//g; $file =~ s|/+|/|; - # read the full archive from the FreeBSD ftp server - if ($type eq 'archive' && $file =~ s%^$messagepath%%o) { - print "Location: $ftparchive/$file.gz\n"; - print "Content-type: text/plain\n\n"; - return; + # read the full archive + if ($type eq 'archive') { + # from the FreeBSD ftp server + if ($file =~ s%^$messagepath%%o) { + print "Location: $ftparchive/$file.gz\n"; + print "Content-type: text/plain\n\n"; + exit(0); + } + + # from the local mail archive for current mails + elsif ($file =~ m%^current/(cvs|freebsd)-[a-z]+$% && + open(DATA, "$messagepathcurrent$file")) { + print "Content-type: text/plain\n\n"; + while() { + print; + } + close(DATA); + exit(0); + } } if (($file =~ /^$messagepath/ && open(DATA, $file)) || @@ -175,7 +189,7 @@ sub MessageToHTML $message .= qq{| Previous in thread\n}; } $message .= qq{| Raw E-Mail\n}; - $message .= qq{| Current Archive\n} if $file =~ m%^$messagepath%o; + $message .= qq{| Archive\n}; $message .= qq{| Help\n}; $message .= "
\n";