summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2014-06-17 22:56:21 +0200
committerBenny Baumann <BenBE@geshi.org>2014-06-17 23:01:27 +0200
commitb275df70541737f4bc1576db57e7236e105f101f (patch)
treee8519f8d96ca4f2444c0e3bfe6604392e4a73335
parent552516401a472abea7062a5762ec25cda26965ef (diff)
downloadcacert-devel-bug-773.tar.gz
cacert-devel-bug-773.tar.xz
cacert-devel-bug-773.zip
bug 773: Whitespace at EOL and indentationbug-773
-rwxr-xr-xCommModule/client.pl49
1 files changed, 23 insertions, 26 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl
index 1803cd2..bc8919d 100755
--- a/CommModule/client.pl
+++ b/CommModule/client.pl
@@ -1025,28 +1025,27 @@ sub RevokeCerts($$)
{
$dbh->do("update `$table` set `revoked`=now() where `id`='".$row{'id'}."'");
- if($org eq "")
- {
- if($server)
- {
- my @a=$dbh->selectrow_array("select `memid` from `domains` where `id`='".int($row{domid})."'");
- sendRevokeMail($a[0], $row{'CN'}, $row{'serial'});
- }
- else
- {
- sendRevokeMail($row{memid}, $row{'CN'}, $row{'serial'});
- }
- }
- else
- {
- my $orgsth = $dbh->prepare("select `memid` from `org` where `orgid`='".int($row{orgid})."'");
- $orgsth->execute();
- while ( my ($memid) = $orgsth->fetchrow_array() )
- {
- sendRevokeMail($memid, $row{'CN'}, $row{'serial'});
- }
-
- }
+ if($org eq "")
+ {
+ if($server)
+ {
+ my @a=$dbh->selectrow_array("select `memid` from `domains` where `id`='".int($row{domid})."'");
+ sendRevokeMail($a[0], $row{'CN'}, $row{'serial'});
+ }
+ else
+ {
+ sendRevokeMail($row{memid}, $row{'CN'}, $row{'serial'});
+ }
+ }
+ else
+ {
+ my $orgsth = $dbh->prepare("select `memid` from `org` where `orgid`='".int($row{orgid})."'");
+ $orgsth->execute();
+ while ( my ($memid) = $orgsth->fetchrow_array() )
+ {
+ sendRevokeMail($memid, $row{'CN'}, $row{'serial'});
+ }
+ }
}
}
@@ -1065,20 +1064,18 @@ sub sendRevokeMail()
my $certName = $_[1];
my $serial = $_[2];
setUsersLanguage($memid);
-
+
my %user=getUserData($memid);
-
+
my $body = _("Hi")." $user{fname},\n\n";
$body .= sprintf(_("Your certificate for '%s' with the serial number '%s' has been revoked, as per request.")."\n\n", $certName, $serial);
$body .= _("Best regards")."\n"._("CAcert.org Support!")."\n\n";
SysLog("Sending email to ".$user{"email"}."\n") if($debug);
sendmail($user{email}, "[CAcert.org] "._("Your certificate"), $body, "support\@cacert.org", "", "", "CAcert Support");
-
}
-
sub HandleGPG()
{
my $sth = $dbh->prepare("select * from gpg where crt='' and csr!='' ");