Fix server cert expiry queries

Addresses #1544
This commit is contained in:
Jan Dittberner 2024-10-05 09:55:10 +02:00
parent efe24df995
commit 18ffb1b781

View file

@ -1273,19 +1273,19 @@ function get_user_agreements($memid, $type=null, $active=null){
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `revoked`>NOW()";
}else{
and `domaincerts`.`revoked` > NOW()";
} else {
$query1 = "
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `expire`>( SUBDATE( NOW(), 90 ))
and `revoked`<`created`";
and `domaincerts`.`expire` > ( SUBDATE( NOW(), 90 ))
and `domaincerts`.`revoked` < `domaincerts`.`created`";
$query2 = "
select 1 from `domaincerts` join `domains`
on `domaincerts`.`domid` = `domains`.`id`
where `domains`.`memid` = '$uid'
and `revoked`>( SUBDATE( NOW(), 90 ))";
and `domaincerts`.`revoked` > ( SUBDATE( NOW(), 90 ))";
}
$res = mysql_query($query1);
$r1 = mysql_num_rows($res)>0;