summaryrefslogtreecommitdiff
path: root/pages/account/12.php
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2014-02-23 10:48:51 +0100
committerINOPIAE <inopiae@cacert.org>2014-02-23 10:48:51 +0100
commitf61fea524761ff08e8bfd340d79688ec1ff9df50 (patch)
tree8ea7c641ec2a91aea079f0ffd5c9f248a0b04d7c /pages/account/12.php
parent862c802e5cd4c6644d1cafe4b88d30c7d7ae2feb (diff)
downloadcacert-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/12.php')
-rw-r--r--pages/account/12.php10
1 files changed, 6 insertions, 4 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)
{