mhonarc-commits
[Top] [All Lists]

CVS: mharc/lib/MHArc CGI.pm,NONE,1.1 Namazu.pm,NONE,1.1 MailUtil.pm,1.1,1.2

2002-09-03 09:31:13
Update of /cvsroot/mhonarc/mharc/lib/MHArc
In directory subversions:/tmp/cvs-serv3998/lib/MHArc

Modified Files:
	MailUtil.pm 
Added Files:
	CGI.pm Namazu.pm 
Log Message:
* bin/extract-mesg-date:
  . Added check for new MSG_DATE_FIELDS config.sh variable denoting
    the message header fields to extract the date from.  The
    value of MSG_DATE_FIELDS is used if -datefields is not specified.
* bin/filter-spool:
  . If there is no mail in the spool, but .newmail exists,
    filter-spool will still process .newmail.  .newmail is the
    messages copied from the spool when filter-spool is executing.
    In the past, even if .newmail exists, no mail in the spool
    will cause filter-spool to exit.
* bin/web-archive:
  . Added check for MSG_DATE_FIELDS config.sh variable.  If set,
    its value will passed to MHonArc via the DATEFIELDS resource.
  . Define $MESG-CGI$ resource variable for use within MHonArc
    resource files.
* cgi-bin/extract-mesg.cgi.in.dist:
  . Internal changes so its uses new MHArc::CGI utility routines.
  . POD added.
* cgi-bin/mesg.cgi.in.dist:
  . NEW: New CGI program to extract a message from an archive based
    upon message-id.  This allows for persistent URLs to messages
    that are immune to archive rebuilds that could change MHonArc
    message numbers.
    This CGI is referenced in the updated lib/common.mrc.in.dist
    resource file via the $MESG-CGI$ resource variable.  It is
    used for the new [Bookmark Link] on message pages.
* cgi-bin/mnav.cgi.in.dist:
  . Added some sanity checks to argument input.
  . Internal changes so its uses new MHArc::CGI utility routines.
  . POD added.
* lib/common.mrc.in.dist:
  . Added "[Bookmark Link]" to message page layout to provide a
    persistent link to the message.  The link provided makes use
    of the new mesg.cgi CGI script.
* lib/config.sh.dist:
  . Added MSG_DATE_FIELDS: List of message header fields to extract
    the date for a message.
  . Added MESG_CGI: URL to persistent message reference CGI program
    (mesg.cgi).
* lib/MHArc/CGI.pm:
  . NEW: Shared CGI utility routines for mharc CGI scripts.
* lib/MHArc/MailUtil.pm:
  . extract_date() routine changed to handle indexed header fields
    in date fields argument.
    CAUTION: Only use indexed field specification if you are using
    a version of MHonArc *newer than* 2.5.11.  MHonArc v2.5.11,
    and earlier versions, do not support indexed fields for the
    DATEFIELDS resource.
* lib/MHArc/Namazu.pm:
  . NEW: Collection of routines related to Namazu.


***** Error reading new file: [Errno 2] No such file or directory: 'CGI.pm'
***** Error reading new file: [Errno 2] No such file or directory: 'Namazu.pm'
Index: MailUtil.pm
===================================================================
RCS file: /cvsroot/mhonarc/mharc/lib/MHArc/MailUtil.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MailUtil.pm	17 Jul 2002 21:59:36 -0000	1.1
--- MailUtil.pm	3 Sep 2002 16:30:47 -0000	1.2
***************
*** 41,54 ****
  
  sub extract_date {
!   my $fields     = shift;
!   my @date_files = @_;
!   if (!(_at_)date_fields) {
!     @date_fields = ('received', 'delivery-date', 'date');
    }
  
    my @date;
!   my($field_str, $unix_time);
!   foreach my $df (@date_fields) {
!     if (defined($field_str = $fields->{$df}[0])) {
        print qq/Debug: $df: $field_str\n/  if $Debug;
        if ($df eq 'received') {
--- 41,67 ----
  
  sub extract_date {
!   my $fields      = shift;
!   my @dfs         = @_;
! 
!   local $_;
!   my @date_fields = ( );
!   if (!(_at_)dfs) {
!     @date_fields = ( ['received',0],['delivery-date',0],['date',0] );
!   } else {
!     foreach (@dfs) {
!       s/\s//g;  tr/A-Z/a-z/;
!       if (s/\[(\d+)\]//) {
! 	push(@date_fields, [ $_, $1 ]);
!       } else {
! 	push(@date_fields, [ $_, 0 ]);
!       }
!     }
    }
  
    my @date;
!   my($field_str, $unix_time, $df, $i);
!   foreach (@date_fields) {
!     ($df, $i) = @$_;
!     if (defined($field_str = $fields->{$df}[$i])) {
        print qq/Debug: $df: $field_str\n/  if $Debug;
        if ($df eq 'received') {
***************
*** 65,68 ****
--- 78,82 ----
    }
    if (!defined($unix_time)) {
+     print qq/Debug: Unable to parse date, using current time\n/  if $Debug;
      $unix_time = time;
    }

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-DEV