comparison contrib/web/perl-admin/htdocs/subscribers.cgi @ 787: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 7fefd9a9fad5
children
comparison
equal deleted inserted replaced
786:b542f6e55f5b 787:284c640f1b3f
102 system "$mlmmjsub -L $topdir/$list -a $email -Ud -s"; 102 system "$mlmmjsub -L $topdir/$list -a $email -Ud -s";
103 } 103 }
104 if ($nomailsub) { 104 if ($nomailsub) {
105 system "$mlmmjsub -L $topdir/$list -a $email -Un -s"; 105 system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
106 } 106 }
107 $action .= "$email has been subscribed.<br>\n"; 107 if ($? == 0) {
108 $action .= "$email has been subscribed.<br>\n";
109 } else {
110 $action .= "error subscribing $email (code $?)<br>\n";
111 }
108 } else { 112 } else {
109 $action .= '"'.encode_entities($email).'" is not a valid email address.<br>'; 113 $action .= '"'.encode_entities($email).'" is not a valid email address.<br>';
110 } 114 }
111 } 115 }
112 } elsif (defined $email) { 116 } elsif (defined $email) {
121 system "$mlmmjsub -L $topdir/$list -a $email -Ud -s"; 125 system "$mlmmjsub -L $topdir/$list -a $email -Ud -s";
122 } 126 }
123 if ($nomailsub) { 127 if ($nomailsub) {
124 system "$mlmmjsub -L $topdir/$list -a $email -Un -s"; 128 system "$mlmmjsub -L $topdir/$list -a $email -Un -s";
125 } 129 }
126 $action = "error adding $email (code $?)"; 130 if ($? == 0) {
131 $action = "$email has been added";
132 } else {
133 $action = "error adding $email (code $?)";
134 }
127 } else { 135 } else {
128 $action = '"'.encode_entities($email).'" is not a valid email address.'; 136 $action = '"'.encode_entities($email).'" is not a valid email address.';
129 } 137 }
130 } elsif (defined $update) { 138 } elsif (defined $update) {
131 my $maxid = $q->param("maxid"); 139 my $maxid = $q->param("maxid");