[vhffs-dev] [1148] Simplify new subscriber check.

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


Revision: 1148
Author:   beuss
Date:     2008-02-05 11:41:45 +0000 (Tue, 05 Feb 2008)

Log Message:
-----------
Simplify new subscriber check.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Services/MailingList.pm


Modified: trunk/vhffs-api/src/Vhffs/Services/MailingList.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/MailingList.pm	2008-02-04 11:40:31 UTC (rev 1147)
+++ trunk/vhffs-api/src/Vhffs/Services/MailingList.pm	2008-02-05 11:41:45 UTC (rev 1148)
@@ -225,9 +225,7 @@
     my $right = shift;
 
     return -1 unless( Vhffs::Functions::valid_mail( $subscriber ) );
-    return -2 if( $subscriber =~ /.*<.*/ );
-    return -2 if( $subscriber =~ /.*>.*/ );
-    return -2 if( $subscriber =~ /.*\s.*/ );
+    return -2 if( $subscriber =~ /[<>\s]/ );
     return -1 if( ! ( $right =~ /^[\d]+$/ ) );
 
     my $sql = 'INSERT INTO vhffs_ml_subscribers (member, perm, hash, ml_id, language) VALUES (?, ?, NULL, ?, NULL)';


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