diff options
author | Michael Tänzer <neo@nhng.de> | 2012-04-18 19:01:49 +0200 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2012-04-18 19:01:49 +0200 |
commit | 61b9d45e70358f0f79c21e6449ee8a0d7d18f035 (patch) | |
tree | 2bb7aa87b2fcd1a075d09345c2ec255552cd709a /includes | |
parent | b41f35ea6ed4bef7cb15ffb665c08d1987adcc69 (diff) | |
download | cacert-devel-61b9d45e70358f0f79c21e6449ee8a0d7d18f035.tar.gz cacert-devel-61b9d45e70358f0f79c21e6449ee8a0d7d18f035.tar.xz cacert-devel-61b9d45e70358f0f79c21e6449ee8a0d7d18f035.zip |
bug 922: also fix domlink handling in domain disputes
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'includes')
-rw-r--r-- | includes/account.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/includes/account.php b/includes/account.php index 554713e..5e87605 100644 --- a/includes/account.php +++ b/includes/account.php @@ -620,10 +620,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 `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'"); } } } |