[vhffs-dev] [549] listengine: a lot of grammar fixes, subscriber approval is in progress, some bug fixed, and such...

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


Revision: 549
Author:   gradator
Date:     2007-04-09 01:11:12 +0000 (Mon, 09 Apr 2007)

Log Message:
-----------
listengine: a lot of grammar fixes, subscriber approval is in progress, some bug fixed, and such...

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Constants.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Listengine/Intl.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm
    branches/vhffs_4.1/vhffs-listengine/src/listengine.pl
    branches/vhffs_4.1/vhffs-panel/mailinglist/prefs.pl
    branches/vhffs_4.1/vhffs-panel/templates/mailinglist/list_part.tmpl


Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Constants.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Constants.pm	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Constants.pm	2007-04-09 01:11:12 UTC (rev 549)
@@ -7,7 +7,7 @@
 
 use constant
 {
-    VHFFS_VERSION => '4.1-alpha (Revision: 544)',
+    VHFFS_VERSION => '4.1-alpha (Revision: 547)',
     VHFFS_RELEASE_NAME => "hippocampus",
     
     WAITING_FOR_VALIDATION => 1,
@@ -46,6 +46,7 @@
     DEFAULT_LANG => "en_US",
 
     ML_RIGHT_SUB_WAITING_FOR_REPLY => 2,	
+    ML_RIGHT_SUB_WAITING_FOR_VALIDATION => 3,
     ML_RIGHT_SUB                   => 4,
     ML_RIGHT_ADMIN                 => 10,
     ML_RIGHT_SUB_WAITING_FOR_DEL   => 12,

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Listengine/Intl.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Listengine/Intl.pm	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Listengine/Intl.pm	2007-04-09 01:11:12 UTC (rev 549)
@@ -29,16 +29,12 @@
 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 # POSSIBILITY OF SUCH DAMAGE.
 
-
-
 package Vhffs::Listengine::Intl;
 
-
 use locale;
 use Locale::gettext;
 
 
-
 sub generate_help
 {
     my $list = shift;
@@ -48,8 +44,7 @@
     push( @result , "\n" );
     push( @result , gettext( "All commands can be sent as mail subject.\n" ) );
     push( @result , gettext( "You can also send a command list in the mail body.\n" )  );
-    push( @result , gettext( "All mails with commands must be sent on 
-                     YOURLIST-request\@domain.tld list.\n" ) );
+    push( @result , gettext( "All mails with commands must be sent on YOURLIST-request\@domain.tld list.\n" ) );
     push( @result , "\n" );
     push( @result , gettext("Here are the basic listengine commands:\n") );
     push( @result , gettext("help\t\t - show this help\n") );
@@ -68,31 +63,30 @@
     push( @result , gettext("\t\t\t\t   RIGHT can be subscriber or admin\n") );
     push( @result , gettext("user info user\@domain.tld\t\t - show this user's informations\n"  ));
 
-
     push( @result , "\n" );
-
     
     return( \@result );
 }
 
+
 sub new_sub
 {
     my $list = shift;
     my $from = shift;
-    my $hash = shift;
+    my $pass = shift;
     my @result;
  
-    push( @result , sprintf( "You send a request to subscribe to the following list: %s\n" , $list->get_listname) );
-    push( @result , gettext( "You must confirm your request by sending a confirmation emailn\n")  );
-    push( @result , sprintf( gettext( "This mail must have the following subject : \"confirm subscribe %s\"\n")  , $hash ) );
+    push( @result , sprintf( "You sent a request to subscribe to the following list:\n\n%s\n\n" , $list->get_listname) );
+    push( @result , gettext( "You must confirm your request by sending a confirmation email\n")  );
+    push( @result , sprintf( gettext( "This mail must have the following subject : \"confirm subscribe %s\"\n")  , $pass ) );
     push( @result , "\n" );
-    push( @result , gettext( "If this mail is an error and you don't ask to be a subscriber to this list, please do not answer to this mail\n" ) );
+    push( @result , gettext( "If you haven't asked to be subscribed to this list,\nplease don't answer to this mail\n" ) );
     push( @result , "\n" );
-
     
     return( \@result );
 }
 
+
 sub new_unsub
 {
     my $list = shift;
@@ -100,14 +94,13 @@
     my $hash = shift;
     my @result;
  
-    push( @result , sprintf( "You ask to be removed from the list %s\n" , $list->get_listname) );
-    push( @result , gettext( "You must confirm this request by seding a email\n")  );
+    push( @result , sprintf( "You asked to be removed from the following list:\n\n%s\n\n" , $list->get_listname) );
+    push( @result , gettext( "You must confirm your request by sending a confirmation email\n")  );
     push( @result , sprintf( gettext( "This mail must contains the following subject : \"confirm unsubscribe %s\"\n")  , $hash ) );
-    push( @result , gettext( "If this mail is an error and you don't ask to be a subscriber to this list, please do not answer to this mail\n" ) );
     push( @result , "\n" );
+    push( @result , gettext( "If you haven't asked to be unsubscribed from this list,\nplease don't answer to this mail\n" ) );
     push( @result , "\n" );
 
-    
     return( \@result );
 }
 
@@ -118,29 +111,28 @@
     my $from = shift;
     my @result;
  
-    push( @result , sprintf( gettext( "You ask to be subscribed to the following list: %s\n" ) , $list->get_listname) );
-    push( @result , sprintf( gettext( "Adress %s is already a subscriber for this list.\n")  , $from ) );
-    push( @result , gettext( "The state of you subscription was not changed, you are always a subscriber\n") , $hash  );
+    push( @result , sprintf( gettext( "You asked to be subscribed to the following list:\n\n%s\n\n" ) , $list->get_listname) );
+    push( @result , sprintf( gettext( "However you are (%s) already subscribed to this list.\n")  , $from ) );
     push( @result , "\n" );
+    push( @result , gettext( "The state of you subscription was not changed, you are still subscribed\n") , $hash  );
+    push( @result , "\n" );
 
-    
     return( \@result );
 }
 
+
 sub sub_deny
 {
     my $list = shift;
     my $from = shift;
     my @result;
 
-    push( @result , sprintf( gettext( "Subscribe to the list %s is forbidden\n" ) , $list->get_listname) );
-    push( @result , gettext( "Your request has been removed.\n") );
-    push( @result , "\n" );
+    push( @result , sprintf( gettext( "Subscription to the following list is forbidden:\n\n%s\n\nHave a nice day.\n" ) , $list->get_listname) );
     
-    
     return( \@result );
 }
 
+
 sub confirm_sub
 {
     my $list = shift;
@@ -148,42 +140,57 @@
     my @result;
 
     push( @result , sprintf( gettext( "You have been successfully subscribed to the list %s\n" ) , $list->get_listname) );
-    push( @result , gettext( "------\n")  );
-    push( @result , gettext( "You can post on the list now.") );
-    push( @result , gettext( "------\n") );
-    push( @result , gettext( "You can have some help on listengine, sending an email to\n")  );
-    push( @result , sprintf( gettext( "%s-request\@%s with subject : \"help\"\n")  , $list->get_localpart , $list->get_domain ) );
+    push( @result , gettext( "\n")  );
+    push( @result , gettext( "You may get some help on listengine by sending an email to\n") );
+    push( @result , sprintf( gettext( "%s-request\@%s with subject \"help\"\n")  , $list->get_localpart , $list->get_domain ) );
     push( @result , "\n" );
     
+    return( \@result );
+}
+
+
+sub confirm_sub_approvalneeded
+{
+    my $list = shift;
+    my $from = shift;
+    my @result;
+
+    push( @result , sprintf( gettext( "You have been successfully subscribed to the list %s\n" ) , $list->get_listname) );
+    push( @result , gettext( "\n")  );
+    push( @result , gettext( "However this list require approval for new subscribers.\n") );
+    push( @result , gettext( "You will receive an email with the decision of administrators.\n") );
+    push( @result , gettext( "\n") );
+    push( @result , gettext( "You may get some help on listengine by sending an email to\n") );
+    push( @result , sprintf( gettext( "%s-request\@%s with subject \"help\"\n")  , $list->get_localpart , $list->get_domain ) );
+    push( @result , "\n" );
     
     return( \@result );
 }
 
+
 sub confirm_unsub
 {
     my $list = shift;
     my $from = shift;
     my @result;
 
-    push( @result , sprintf( gettext( "You have been successfully removed from the list %s\n" ) , $list->get_listname) );
+    push( @result , sprintf( gettext( "You have been successfully removed from the following list:\n\n%s\n" ) , $list->get_listname) );
     
     return( \@result );
 }
 
 
-
 sub error_sub
 {
     my $list = shift;
     my $from = shift;
     my @result;
 
-    push( @result , sprintf( gettext( "An error occurs while you subscribed to the list  %s \n" ) , $list->get_listname) );
+    push( @result , sprintf( gettext( "An error occured during your subscription to the following list:\n\n%s\n\n" ) , $list->get_listname) );
     push( @result , gettext("The confirmation code was wrong\n" ));
-    push( @result , gettext("Please try again\n" ));
+    push( @result , gettext("Please try again !\n" ));
     push( @result , "\n" );
     
-    
     return( \@result );
 }
 
@@ -200,10 +207,10 @@
 
     push( @result , "\n" );
     
-    
     return( \@result );  
 }
 
+
 sub error_unsub
 {
     my $list = shift;
@@ -216,7 +223,6 @@
 
     push( @result , "\n" );
     
-    
     return( \@result );  
 }
 
@@ -232,10 +238,10 @@
 
     push( @result , "\n" );
     
-    
     return( \@result );  
 }
 
+
 sub unsub_success
 {
     my $list = shift;
@@ -263,6 +269,7 @@
     return( \@result );  
 }
 
+
 sub lang_change_error
 {
     my $list = shift;
@@ -312,6 +319,7 @@
     return( \@result );
 }
 
+
 sub refuse_success
 {
     my $list = shift;
@@ -327,6 +335,7 @@
     return( \@result );
 }
 
+
 sub moderate_error
 {
     my $list = shift;
@@ -343,12 +352,12 @@
     return( \@result );
 }
 
+
 sub moderate_success
 {
     my $list = shift;
     my $hash = shift;
 
-
     push( @result , sprintf( gettext( "Mail with id %s") , $hash ) );
     push( @result , sprintf( gettext( "in the moderation queue of the list %s") , $list->get_listname ) );
     push( @result , gettext( "was sent on the list.\n" ) );
@@ -374,7 +383,6 @@
 }
 
 
-
 sub moderate_message
 {
     my $list = shift;
@@ -394,6 +402,28 @@
     return( \@result );  
 }
 
+
+sub moderate_subscriber
+{
+    my $list = shift;
+    my $from = shift;
+    my @result;
+    
+    push( @result , sprintf( gettext( "A new person wants to subscribe to the following mailing list:\n\n%s\n\n" ) , $list->get_listname) );
+    push( @result , sprintf( gettext( "His email address is:\n  %s\n" ) , $from) );
+    push( @result , $subject );
+    push( @result , "\n" );
+    push( @result , gettext( "To accept this subscriber, send a message to\n" ) );
+    push( @result , sprintf( gettext( "  %s-request\@%s\nwith the following subject :\n  \"accept %s\" \n" ) , $list->get_localpart , $list->get_domain , $from) );
+    push( @result , "\n" );
+    push( @result , gettext( "To refuse this subscriber, send a message to\n" ) );
+    push( @result , sprintf( gettext( "  %s-request\@%s\nwith the following subject :\n  \"refuse %s\" \n" ) , $list->get_localpart , $list->get_domain , $from) );
+    push( @result , "\n" );
+    
+    return( \@result );  
+}
+
+
 sub value_month
 {
     my $value = shift;
@@ -446,15 +476,8 @@
     {
 	return gettext( "December" );
     }
-
-
-
     
-    return gettext( "Unknown month" );
-    
+    return gettext( "Unknown month" );    
 }
 
-
-
-
 1;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-04-09 01:11:12 UTC (rev 549)
@@ -216,21 +216,19 @@
 #add a subscriber, return undef if already exists
 sub add_sub_with_reply
 {
-    use Digest::MD5;
     my $self = shift;
     my $subscriber = shift;
-    my $hash;
 
     return undef if( Vhffs::Functions::valid_mail( $subscriber ) != 1 );
     return undef if( $subscriber =~ /.*<.*/ );
     return undef if( $subscriber =~ /.*>.*/ );
     return undef if( $subscriber =~ /.*\s.*/ );
 
-    $hash = Digest::MD5::md5_hex( Vhffs::Functions::generate_random_password );
-   
+    my $pass = Vhffs::Functions::generate_random_password;
+
     my $sql = 'INSERT INTO vhffs_ml_subscribers(member, perm, hash, ml_id, language) VALUES(?, ?, ?, ?, NULL)';
     my $dbh = $self->get_main->get_db_object();
-    $dbh->do($sql, undef, $subscriber, Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY, $hash, $self->{ml_id}) or return undef;
+    $dbh->do($sql, undef, $subscriber, Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY, $pass, $self->{ml_id}) or return undef;
 
     my $id = $dbh->last_insert_id(undef, undef, 'vhffs_ml_subscribers', undef);
 
@@ -238,12 +236,12 @@
         sub_id => $id,
         member => $subscriber,
         perm => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY,
-        hash => $hash,
+        hash => $pass,
         ml_id => $self->{ml_id},
         language => undef
     };
 
-    return $hash;
+    return $pass;
 }
 
 
@@ -267,6 +265,20 @@
     return change_right_for_sub(@_);
 }
 
+sub set_randompass
+{
+    my $self = shift;
+    my $subscriber = shift;
+    my $pass = Vhffs::Functions::generate_random_password;
+
+    my $sql = 'UPDATE vhffs_ml_subscribers SET hash = ? WHERE ml_id = ? AND member = ?';
+    return undef unless($self->get_main->get_db_object->do($sql, undef, $pass, $self->{ml_id}, $subscriber) > 0);
+    
+    $self->{subs}->{$subscriber}->{hash} = $pass;
+    return $pass;
+}
+
+
 sub clear_hash
 {
     my $self = shift;

Modified: branches/vhffs_4.1/vhffs-listengine/src/listengine.pl
===================================================================
--- branches/vhffs_4.1/vhffs-listengine/src/listengine.pl	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-listengine/src/listengine.pl	2007-04-09 01:11:12 UTC (rev 549)
@@ -161,9 +161,7 @@
     
     my $filehash = Digest::MD5::md5_hex( $message_id );
     my $file = "$directory/".$filehash;
-    
-    
-    
+        
     open( FILE , ">$file");
     print FILE $mail->as_string;
     close( FILE );
@@ -178,8 +176,7 @@
     $header->replace( 'From' ,  $LISTMASTER );
     $header->replace( 'Subject' ,  "moderate $filehash" );
     $header->replace( 'Reply-To' , $list->get_localpart ."-request"."\@".$list->get_domain);
-    
-    
+        
     $email = Mail::Internet->new(  [ <> ]  , 
 				   Header => $header,
 				   Body => Vhffs::Listengine::Intl::moderate_message( $list , $filehash , $from , $subject )
@@ -189,12 +186,10 @@
 }
 
 
-
 sub subscribe_to_list
 {
     my $list = shift;
     my $from = shift;
-    my $hash;
     my $header;
     my $email;
     my $message;
@@ -204,66 +199,60 @@
 
     if( $sub_ctrl == Vhffs::Constants::ML_SUBSCRIBE_CLOSED )
     {
-	$message ="Subscribtion are not allowed for this list";
+	$message = "Subscribtion are not allowed for this list";
 	push @body , $message ;	
 	push @body , "\n";
 	
 	$header = new Mail::Header( );
 	$header->replace( 'To' ,  $from );
 	$header->replace( 'From' ,  $LISTMASTER );
-	$header->replace( 'Subject' ,  "subscription denied" );
+
+	my $subject = 'subscription denied';
+	$subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+	$header->replace( 'Subject' ,  $subject );
 	
-	
 	$email = Mail::Internet->new(  [ <> ] , 
 				       Header => $header ,
 				       Body => Vhffs::Listengine::Intl::sub_deny( $list , $from )
 				       );
     }
-
-    #FIXME: TODO: do subscription with approval (moderation)
-    #FIXME: fixes the possible multiple subscription ... (ho dear...)
     else
-    {
-	
-	if( defined ( $hash = $list->add_sub_with_reply( $from ) ) )
+    {	
+	if( defined ( my $pass = $list->add_sub_with_reply( $from ) ) )
 	{
 	    $header = new Mail::Header( );
 	    $header->replace( 'To' ,  $from );
 	    $header->replace( 'From' ,  $LISTMASTER );
-	    $header->replace( 'Subject' ,  "confirm subscribe $hash" );
+	    my $subject = 'confirm subscribe '.$pass;
+	    $subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+	    $header->replace( 'Subject' ,  $subject );
 	    $header->replace( 'Reply-To' , $list->get_localpart ."-request"."\@".$list->get_domain);
 	    
-	    
 	    $email = Mail::Internet->new(  [ <> ]  , 
 					   Header => $header,
-					   Body => Vhffs::Listengine::Intl::new_sub( $list , $from , $hash )
+					   Body => Vhffs::Listengine::Intl::new_sub( $list , $from , $pass )
 					   );
-	    
 	}
 	else
 	{
-		    
 	    $header = new Mail::Header( );
 	    $header->replace( 'To' ,  $from );
 	    $header->replace( 'From' ,  $LISTMASTER );
-	    $header->replace( 'Subject' ,  "already subscriber for the list" );
-	    
-	    
+	    my $subject = 'You are already subscribed to this list';
+	    $subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+	    $header->replace( 'Subject' ,  $subject );
+   
 	    $email = Mail::Internet->new(  [ <> ]  , 
 					   Header => $header,
 					   Body => Vhffs::Listengine::Intl::sub_already_exist( $list , $from )
 					   );
-
 	}
     }
 
-   
     sendmail( $email , $from ) if( defined $email );
-
 }
 
 
-
 sub unsubscribe_to_list
 {
     my $list = shift;
@@ -329,38 +318,79 @@
 	# Ok, hash are the same, treat the mail now
 	if( $hash eq $subs->{$from}{'hash'} )
 	{
-	    my $header = new Mail::Header( );
-	    $header->replace( 'To' ,  $from );
-	    $header->replace( 'From' ,  $LISTMASTER );
-	    $header->replace( 'Subject' , "Successfully subscribe" );
-    	    $header->replace('Date' , gmtime()." +00");
-	    
-	    my $email = Mail::Internet->new(  [ <> ] , 
-					      Header => $header ,
-					      Body => Vhffs::Listengine::Intl::confirm_sub( $list , $from )
-					      );
-	    sendmail( $email , $from );
-	    
-	    $list->change_state_for_sub( $from , Vhffs::Constants::ML_RIGHT_SUB );
-	    $list->clear_hash( $from );
+		my $header = new Mail::Header( );
+		$header->replace( 'To' ,  $from );
+		$header->replace( 'From' ,  $LISTMASTER );
+		my $subject = 'Successfully subscribed';
+		$subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+		$header->replace( 'Subject' , $subject );
+		$header->replace('Date' , gmtime()." +00");
+
+		# validation needed or not ?
+		if( $list->get_sub_ctrl == Vhffs::Constants::ML_SUBSCRIBE_APPROVAL_REQUIRED )  {
+
+			my $email = Mail::Internet->new(  [ <> ] , 
+				Header => $header ,
+				Body => Vhffs::Listengine::Intl::confirm_sub_approvalneeded( $list , $from )
+				);
+
+			$list->change_state_for_sub( $from , Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION );
+			$list->clear_hash( $from );
+			sendmail( $email , $from );
+
+			my @tos;
+			my $members = $list->get_members;
+
+			# send a mail to all admins
+			foreach ( keys %{$members} )
+			{
+				push( @tos , $_ ) if( $members->{$_}{perm} == Vhffs::Constants::ML_RIGHT_ADMIN );
+			}
+
+			my $header = new Mail::Header( );
+			$header->replace( 'From' ,  $LISTMASTER );
+			$header->replace( 'To' ,  $LISTMASTER );
+			my $subject = 'approval '.$from;
+			$subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+			$header->replace( 'Subject' , $subject );
+			$header->replace( 'Reply-To' , $list->get_localpart ."-request"."\@".$list->get_domain);
+
+			$email = Mail::Internet->new(  [ <> ]  , 
+				   Header => $header,
+				   Body => Vhffs::Listengine::Intl::moderate_subscriber( $list , $from )
+				   );
+    
+			sendmail( $email , \@tos ) if( ( defined $email ) && ( $#tos >= 0 ) );
+		}
+		else  {
+
+			my $email = Mail::Internet->new(  [ <> ] , 
+				Header => $header ,
+				Body => Vhffs::Listengine::Intl::confirm_sub( $list , $from )
+				);
+
+			$list->change_state_for_sub( $from , Vhffs::Constants::ML_RIGHT_SUB );
+			$list->clear_hash( $from );
+			sendmail( $email , $from );
+		}
 	}
 	else
 	{
 	    my $header = new Mail::Header( );
 	    $header->replace( 'To' ,  $from );
 	    $header->replace( 'From' ,  $LISTMASTER );
-	    $header->replace( 'Subject' , "Subscribing error" );
+	    my $subject = 'Subscribe error';
+	    $subject = '['.$list->get_prefix.'] '.$subject if( length( $list->get_prefix ) > 0 );
+	    $header->replace( 'Subject' , $subject );
     	    $header->replace('Date' , gmtime()." +00");
 	    
 	    my $email = Mail::Internet->new(  [ <> ] , 
 					      Header => $header ,
 					      Body => Vhffs::Listengine::Intl::error_sub( $list , $from )
 					      );
-	    sendmail( $email , $from );
-	    
+	    sendmail( $email , $from );	    
 	}
     }
-
 }
 
 sub confirm_unsub
@@ -437,7 +467,7 @@
 	my $qprefix = quotemeta $prefix;
 	unless ( $tsubject =~ /\[$qprefix\]/)
 	{
-		$mail->replace( 'Subject' , "[".$prefix."]"." ".$subject ) if( length( $prefix ) > 0 );
+		$mail->replace( 'Subject' , '['.$prefix.'] '.$subject ) if( length( $prefix ) > 0 );
 	}
 
 	# Add list's signature at the bottom of mail

Modified: branches/vhffs_4.1/vhffs-panel/mailinglist/prefs.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/mailinglist/prefs.pl	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-panel/mailinglist/prefs.pl	2007-04-09 01:11:12 UTC (rev 549)
@@ -154,33 +154,9 @@
 	$template->param( TITLE_ADD_MEMBER => gettext("Add a member") );
 	$template->param( TEXT_ADD_MEMBER => gettext("Email adress") );
 	$template->param( BUTTON_ADD_MEMBER => gettext("Add !") );
+	$template->param( CHECK_OPENARCHIVE => "checked" ) if( $list->get_open_archive == 1 );
+	$template->param( CHECK_REPLYTO => "checked" ) if( $list->get_replyto == 1 );
 
-
-	if( $list->get_open_archive == 1 ) 
-	{
-		$template->param( CHECK_OPENARCHIVE => "checked" );
-	}
-
-#	if( $list->get_open_sub == 1 ) 
-#	{
-#		$template->param( CHECK_OPENSUB => "checked" );
-#	}
-#
-#	if( $list->get_open_post == 1 ) 
-#	{
-#		$template->param( CHECK_OPENPOST => "checked" );
-#	}
-
-	if( $list->get_replyto == 1 ) 
-	{
-		$template->param( CHECK_REPLYTO => "checked" );
-	}
-
-#	if( $list->get_moderated == 1 ) 
-#	{
-#		$template->param( CHECK_MODERATED => "checked" );
-#	}
-
 	my $subs = $list->get_members;
 	my $output = "";
 	if( defined $subs )
@@ -194,22 +170,22 @@
 			$subtemplate->param( VALUE_LOCALPART        => $list->get_localpart );
 			$subtemplate->param( VALUE_DOMAIN           => $list->get_domain );
 	
-			$subtemplate->param( VALUE_RIGHT_SUB                       => Vhffs::Constants::ML_RIGHT_SUB );
-			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_REPLY     => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
-			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_DELETE    => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL);
-			$subtemplate->param( VALUE_RIGHT_ADMIN                     => Vhffs::Constants::ML_RIGHT_ADMIN );
+			$subtemplate->param( VALUE_RIGHT_SUB                           => Vhffs::Constants::ML_RIGHT_SUB );
+			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_REPLY         => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
+			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_VALIDATION    => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION );
+			$subtemplate->param( VALUE_RIGHT_SUB_WAITING_FOR_DELETE        => Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL);
+			$subtemplate->param( VALUE_RIGHT_ADMIN                         => Vhffs::Constants::ML_RIGHT_ADMIN );
+			$subtemplate->param( TEXT_RIGHT_SUB                            => gettext( "Subscribed" ) );
+			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_REPLY          => gettext( "Waiting for confirmation" ) );
+			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_VALIDATION     => gettext( "Waiting for validation" ) );
+			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_DELETE         => gettext( "Waiting for deletion" ) );
+			$subtemplate->param( TEXT_RIGHT_ADMIN                          => gettext( "Admin"  ) );
+			$subtemplate->param( SELECTED_RIGHT_SUB                        => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB );
+			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_REPLY      => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
+			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_VALIDATION => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_VALIDATION );
+			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_DELETE     => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL );
+			$subtemplate->param( SELECTED_RIGHT_ADMIN                      => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_ADMIN );
 
-			$subtemplate->param( TEXT_RIGHT_SUB                        => gettext( "Subscriber" ) );
-			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_REPLY      => gettext( "Subscribed. Waiting for confirmation" ) );
-			$subtemplate->param( TEXT_RIGHT_SUB_WAITING_FOR_DELETE      => gettext( "Waiting for delete" ) );
-
-			$subtemplate->param( TEXT_RIGHT_ADMIN                      => gettext( "Admin"  ) );
-
-			$subtemplate->param( SELECTED_RIGHT_ADMIN                  => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_ADMIN );
-			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_DELETE => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_DEL );
-			$subtemplate->param( SELECTED_RIGHT_SUB                    => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB );
-			$subtemplate->param( SELECTED_RIGHT_SUB_WAITING_FOR_REPLY  => "selected" ) if( $subs->{$_}{perm} == Vhffs::Constants::ML_RIGHT_SUB_WAITING_FOR_REPLY );
-	
 			$output .= $subtemplate->output;	
 			$num_members++;
 		}

Modified: branches/vhffs_4.1/vhffs-panel/templates/mailinglist/list_part.tmpl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/templates/mailinglist/list_part.tmpl	2007-04-08 18:16:22 UTC (rev 548)
+++ branches/vhffs_4.1/vhffs-panel/templates/mailinglist/list_part.tmpl	2007-04-09 01:11:12 UTC (rev 549)
@@ -7,6 +7,7 @@
 		<form method="post" action="change_right.pl">
 		    <select name="RIGHT"  id="RIGHT">
         	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_REPLY">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_REPLY">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_REPLY"></option>
+        	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_VALIDATION">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_VALIDATION">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_VALIDATION"></option>
         	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB">> <TMPL_VAR NAME="TEXT_RIGHT_SUB"></option>
 			<option value="<TMPL_VAR NAME="VALUE_RIGHT_SUB_WAITING_FOR_DELETE">" <TMPL_VAR NAME="SELECTED_RIGHT_SUB_WAITING_FOR_DELETE">> <TMPL_VAR NAME="TEXT_RIGHT_SUB_WAITING_FOR_DELETE"></option>
         	    	<option value="<TMPL_VAR NAME="VALUE_RIGHT_ADMIN">" <TMPL_VAR NAME="SELECTED_RIGHT_ADMIN">> <TMPL_VAR NAME="TEXT_RIGHT_ADMIN"></option>
@@ -26,4 +27,4 @@
 			<input type="submit" value="<tmpl_var name="BUTTON_DELETE_MEMBER">" />
 		</form>
 	</td>
-</tr>
\ No newline at end of file
+</tr>


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