summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2014-02-23 10:29:58 +0100
committerINOPIAE <inopiae@cacert.org>2014-02-23 10:29:58 +0100
commit862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb (patch)
tree2a5a12b80647db806fbd8c25a562cfd956b08da5
parent5476ac472c00936c1687541b4eb2b0a40f4eec79 (diff)
downloadcacert-devel-862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb.tar.gz
cacert-devel-862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb.tar.xz
cacert-devel-862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb.zip
bug 413: modified sql-statement for vie client certificiates
-rw-r--r--pages/account/5.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/pages/account/5.php b/pages/account/5.php
index 934ca0c..d70916a 100644
--- a/pages/account/5.php
+++ b/pages/account/5.php
@@ -37,6 +37,7 @@
`emailcerts`.`expire` as `expires`,
`emailcerts`.`revoked` as `revoke`,
UNIX_TIMESTAMP(`emailcerts`.`revoked`) as `revoked`,
+ if (`emailcerts`.`expire`=0,CURRENT_TIMESTAMP(),`emailcerts`.`modified`) as `modified` ,
`emailcerts`.`id`,
`emailcerts`.`CN`,
`emailcerts`.`serial`,
@@ -49,8 +50,8 @@
$query .= " AND `revoked`=0 AND `renewed`=0 ";
$query .= " GROUP BY `emailcerts`.`id` ";
if($viewall != 1)
- $query .= " HAVING `timeleft` > 0 ";
- $query .= " ORDER BY `emailcerts`.`modified` desc";
+ $query .= " HAVING `timeleft` > 0 or `expires` = 0";
+ $query .= " ORDER BY `modified` desc";
// echo $query."<br>\n";
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)