[vhffs-dev] [1137] beautify :p

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1137
Author:   gradator
Date:     2008-01-20 20:05:58 +0000 (Sun, 20 Jan 2008)

Log Message:
-----------
beautify :p

Modified Paths:
--------------
    trunk/vhffs-listengine/src/listengine.pl


Modified: trunk/vhffs-listengine/src/listengine.pl
===================================================================
--- trunk/vhffs-listengine/src/listengine.pl	2008-01-20 06:47:42 UTC (rev 1136)
+++ trunk/vhffs-listengine/src/listengine.pl	2008-01-20 20:05:58 UTC (rev 1137)
@@ -171,14 +171,11 @@
     $month = '0'.$month if( $month <= 9 );
     $day = '0'.$day if( $day <= 9 );
 
-    my $message_id = $mail->get( 'Message-Id' );
+    my ( $message_id  ) =  ($mail->get( 'Message-Id' ) =~ /<(.+)>/);
 
     #Don't archive if message-id is not found
     return unless( defined $message_id  &&  $message_id ne '' );
 
-    $message_id =~ s/^<//;
-    $message_id =~ s/>$//;
-
     my $directory = $DIRECTORY.'/archives/'.$list->get_domain.'/'.$list->get_localpart.'/'.$year.'/'.$month.'/'.$day;
     Vhffs::Functions::create_dir( $directory ) if( ! -d $directory );
 
@@ -197,9 +194,7 @@
     my $members = $list->get_members;
     my $header;
     my $email;
-    my $message_id = $mail->get( 'Message-Id' );
-    $message_id =~ s/^<//;
-    $message_id =~ s/>$//;
+    my ( $message_id  ) =  ($mail->get( 'Message-Id' ) =~ /<(.+)>/);
     my $from = ( $mail->get('From') =~ /(([\+\.a-zA-Z_\-0-9^\s]+)@([\.a-zA-Z_\-0-9^\s]+)\.(\w+))/);
     my $directory = get_moderation_dir( $list );
     my $subject = $mail->get('Subject');


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/