[vhffs-dev] [svn] commit: r239 - /trunk/vhffs-panel/user/prefs_save.pl

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


Author: gradator
Date: Mon Oct 23 22:16:39 2006
New Revision: 239

Log:
Fix abort of script when mailuser is actived but misconfigured


Modified:
    trunk/vhffs-panel/user/prefs_save.pl

Modified: trunk/vhffs-panel/user/prefs_save.pl
==============================================================================
--- trunk/vhffs-panel/user/prefs_save.pl (original)
+++ trunk/vhffs-panel/user/prefs_save.pl Mon Oct 23 22:16:39 2006
@@ -130,11 +130,17 @@
 	{
 		$message = gettext("User Successfully modified") . "<br>";
 	}
-	
+
+	my $mu;	
 	if( $vhffs->get_config->use_mailuser == 1 )
 	{
 		use Vhffs::Services::MailUser;
 		my $mu = init Vhffs::Services::MailUser( $vhffs , $user );
+	}
+
+	# check if mu is not a negative integer
+	if( defined $mu  &&  ! $mu =~ /^-\d+$/ )  {
+
 		my $mail_activate = $cgi->param( "mail_activate" );
 		my $nospam = $cgi->param( "mail_nospam" );
 		my $novirus = $cgi->param( "mail_novirus" );
@@ -200,7 +206,7 @@
 						$mu->addbox( $pass1 );
 					}
 
-					#We change  the spam status. if the pam status change
+					#We change  the spam status. if the spam status change
 					if( $vhffs->get_config->use_nospam == 1 )
 					{
 						if( ( $nospam == 1 ) && ( $mu->use_nospam == 0 ) )




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