[vhffs-dev] [svn] commit: r279 - in /trunk/vhffs-panel/user: prefs.pl prefs_save.pl

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


Author: gradator
Date: Sat Nov  4 18:34:00 2006
New Revision: 279

Log:
Mail user were never displayed due to a wrong condition, fixed


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

Modified: trunk/vhffs-panel/user/prefs.pl
==============================================================================
--- trunk/vhffs-panel/user/prefs.pl (original)
+++ trunk/vhffs-panel/user/prefs.pl Sat Nov  4 18:34:00 2006
@@ -159,8 +159,7 @@
     my $mu = init Vhffs::Services::MailUser( $vhffs , $user );
 	my $tmp = "";
 
-	# check if $mu is not a negative numerical value
-	if( ! $mu =~ /^-\d+$/ )
+	if( defined $mu  &&  $mu >= 0 )
 	{
     
     $subtemplate->param( ACTIV_CHECKED => "checked" ) if( $mu->exists == 1         );

Modified: trunk/vhffs-panel/user/prefs_save.pl
==============================================================================
--- trunk/vhffs-panel/user/prefs_save.pl (original)
+++ trunk/vhffs-panel/user/prefs_save.pl Sat Nov  4 18:34:00 2006
@@ -139,7 +139,7 @@
 	}
 
 	# check if mu is not a negative integer
-	if( defined $mu  &&  ! $mu =~ /^-\d+$/ )  {
+	if( defined $mu  &&  $mu >= 0 )  {
 
 		my $mail_activate = $cgi->param( "mail_activate" );
 		my $nospam = $cgi->param( "mail_nospam" );




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