summaryrefslogtreecommitdiff
path: root/pages
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
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')
-rw-r--r--pages/account/12.php10
-rw-r--r--pages/account/5.php2
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);