diff options
author | INOPIAE <inopiae@cacert.org> | 2014-02-23 10:48:51 +0100 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2014-02-23 10:48:51 +0100 |
commit | f61fea524761ff08e8bfd340d79688ec1ff9df50 (patch) | |
tree | 8ea7c641ec2a91aea079f0ffd5c9f248a0b04d7c /pages/account | |
parent | 862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb (diff) | |
download | cacert-devel-f61fea524761ff08e8bfd340d79688ec1ff9df50.tar.gz cacert-devel-f61fea524761ff08e8bfd340d79688ec1ff9df50.tar.xz cacert-devel-f61fea524761ff08e8bfd340d79688ec1ff9df50.zip |
bug 413: modified sql statement for server certificates
Diffstat (limited to 'pages/account')
-rw-r--r-- | pages/account/12.php | 10 | ||||
-rw-r--r-- | pages/account/5.php | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pages/account/12.php b/pages/account/12.php index 9058a07..e65675d 100644 --- a/pages/account/12.php +++ b/pages/account/12.php @@ -35,17 +35,19 @@ UNIX_TIMESTAMP(`domaincerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`, UNIX_TIMESTAMP(`domaincerts`.`expire`) as `expired`, `domaincerts`.`expire` as `expires`, `revoked` as `revoke`, - UNIX_TIMESTAMP(`revoked`) as `revoked`, `CN`, `domaincerts`.`serial`, `domaincerts`.`id` as `id`, + UNIX_TIMESTAMP(`revoked`) as `revoked`, + if (`domaincerts`.`expire`=0,CURRENT_TIMESTAMP(),`domaincerts`.`modified`) as `modified`, + `CN`, `domaincerts`.`serial`, `domaincerts`.`id` as `id`, `domaincerts`.`description` from `domaincerts`,`domains` where `memid`='".intval($_SESSION['profile']['id'])."' and `domaincerts`.`domid`=`domains`.`id` "; if($viewall != 1) { $query .= "AND `revoked`=0 AND `renewed`=0 "; - $query .= "HAVING `timeleft` > 0 "; + $query .= "HAVING `timeleft` > 0 or `expires` = 0 "; } - $query .= "ORDER BY `domaincerts`.`modified` desc"; -//echo $query."<br>\n"; + $query .= "ORDER BY `modified` desc"; +echo $query."<br>\n"; $res = mysql_query($query); if(mysql_num_rows($res) <= 0) { diff --git a/pages/account/5.php b/pages/account/5.php index d70916a..2815261 100644 --- a/pages/account/5.php +++ b/pages/account/5.php @@ -50,7 +50,7 @@ $query .= " AND `revoked`=0 AND `renewed`=0 "; $query .= " GROUP BY `emailcerts`.`id` "; if($viewall != 1) - $query .= " HAVING `timeleft` > 0 or `expires` = 0"; + $query .= " HAVING `timeleft` > 0 or `expires` = 0 "; $query .= " ORDER BY `modified` desc"; // echo $query."<br>\n"; $res = mysql_query($query); |