mlmmj

changeset 284c640f1b3f

Check return status in mlmmj-perl-admin when adding subscribers (Florian Streibelt, Bitmand)
author Ben Schmidt
date Sun, 21 Nov 2010 00:31:09 +1100
parents b542f6e55f5b
children cd322af071bc
files ChangeLog contrib/web/perl-admin/htdocs/subscribers.cgi
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/ChangeLog	Sun Nov 21 00:30:23 2010 +1100
     1.2 +++ b/ChangeLog	Sun Nov 21 00:31:09 2010 +1100
     1.3 @@ -1,3 +1,5 @@
     1.4 + o Check return status in mlmmj-perl-admin when adding subscribers (Florian
     1.5 +   Streibelt, Bitmand)
     1.6   o Better validation of input in php-admin (Thomas Goirand)
     1.7   o Added Turkish translation (Samed Beyribey)
     1.8   o Fixed security bug in mlmmj-php-admin (Florian Streibelt, Morten Shearman
     2.1 --- a/contrib/web/perl-admin/htdocs/subscribers.cgi	Sun Nov 21 00:30:23 2010 +1100
     2.2 +++ b/contrib/web/perl-admin/htdocs/subscribers.cgi	Sun Nov 21 00:31:09 2010 +1100
     2.3 @@ -104,8 +104,12 @@
     2.4  		if ($nomailsub) {
     2.5  			system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
     2.6  		}
     2.7 +		if ($? == 0) {
     2.8  		$action .= "$email has been subscribed.<br>\n";
     2.9  	   } else {
    2.10 +			$action .= "error subscribing $email (code $?)<br>\n";
    2.11 +		}
    2.12 +	   } else {
    2.13  		$action .= '"'.encode_entities($email).'" is not a valid email address.<br>';
    2.14  	   }
    2.15  	}
    2.16 @@ -123,7 +127,11 @@
    2.17  		if ($nomailsub) {
    2.18  			system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
    2.19  		}
    2.20 +		if ($? == 0) {
    2.21 +			$action = "$email has been added";
    2.22 +		} else {
    2.23  		$action = "error adding $email (code $?)";
    2.24 +		}
    2.25  	} else {
    2.26  		$action = '"'.encode_entities($email).'" is not a valid email address.';
    2.27  	}