summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2012-10-31 18:33:53 +0100
committerBenny Baumann <BenBE@geshi.org>2012-10-31 18:33:53 +0100
commitfb0e466bf8805b6972af15f9d38f51a0f45e38de (patch)
tree745df46cf608d7eda3218c51b58efeaf135a8ce0 /includes
parente74bad9bcc62cbc3aea8bfc4aba8f656d7a80bcb (diff)
parent6dd2854e1d61800daa287f4f8139ade9c52a0a58 (diff)
downloadcacert-devel-fb0e466bf8805b6972af15f9d38f51a0f45e38de.tar.gz
cacert-devel-fb0e466bf8805b6972af15f9d38f51a0f45e38de.tar.xz
cacert-devel-fb0e466bf8805b6972af15f9d38f51a0f45e38de.zip
Merge branch 'bug-922' into release
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php26
1 files changed, 23 insertions, 3 deletions
diff --git a/includes/account.php b/includes/account.php
index f14b593..ee5d3f8 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -621,10 +621,30 @@
{
$row = mysql_fetch_assoc($res);
echo $row['domain']."<br>\n";
- mysql_query("update `domains` set `deleted`=NOW() where `id`='$id'");
- $dres = mysql_query("select * from `domlink` where `domid`='$id'");
+
+ $dres = mysql_query(
+ "select distinct `domaincerts`.`id`
+ from `domaincerts`, `domlink`
+ where `domaincerts`.`domid` = '$id'
+ or (
+ `domaincerts`.`id` = `domlink`.`certid`
+ and `domlink`.`domid` = '$id'
+ )");
while($drow = mysql_fetch_assoc($dres))
- mysql_query("update `domaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".$drow['certid']."' and `revoked`=0 and UNIX_TIMESTAMP(`expire`)-UNIX_TIMESTAMP() > 0");
+ {
+ mysql_query(
+ "update `domaincerts`
+ set `revoked`='1970-01-01 10:00:01'
+ where `id` = '".$drow['id']."'
+ and `revoked` = 0
+ and UNIX_TIMESTAMP(`expire`) -
+ UNIX_TIMESTAMP() > 0");
+ }
+
+ mysql_query(
+ "update `domains`
+ set `deleted`=NOW()
+ where `id` = '$id'");
}
}
}