summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2014-02-23 10:53:15 +0100
committerINOPIAE <inopiae@cacert.org>2014-02-23 10:53:15 +0100
commit89d99bee4d8fd38a66a7f812bd23cb9eb2bcc259 (patch)
tree8b1cb743e057e4e7f287e08e13c4b684d8926eb1
parentf61fea524761ff08e8bfd340d79688ec1ff9df50 (diff)
downloadcacert-devel-89d99bee4d8fd38a66a7f812bd23cb9eb2bcc259.tar.gz
cacert-devel-89d99bee4d8fd38a66a7f812bd23cb9eb2bcc259.tar.xz
cacert-devel-89d99bee4d8fd38a66a7f812bd23cb9eb2bcc259.zip
bug 413: modified the sql statement for org client certs
-rw-r--r--pages/account/12.php2
-rw-r--r--pages/account/18.php9
2 files changed, 6 insertions, 5 deletions
diff --git a/pages/account/12.php b/pages/account/12.php
index e65675d..13bef91 100644
--- a/pages/account/12.php
+++ b/pages/account/12.php
@@ -47,7 +47,7 @@
$query .= "HAVING `timeleft` > 0 or `expires` = 0 ";
}
$query .= "ORDER BY `modified` desc";
-echo $query."<br>\n";
+//echo $query."<br>\n";
$res = mysql_query($query);
if(mysql_num_rows($res) <= 0)
{
diff --git a/pages/account/18.php b/pages/account/18.php
index 9ab13b2..d295894 100644
--- a/pages/account/18.php
+++ b/pages/account/18.php
@@ -79,6 +79,7 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c
UNIX_TIMESTAMP(`oemail`.`expire`) as `expired`,
`oemail`.`expire` as `expires`, `oemail`.`revoked` as `revoke`,
UNIX_TIMESTAMP(`oemail`.`revoked`) as `revoked`,
+ if (`oemail`.`expire`=0,CURRENT_TIMESTAMP(),`oemail`.`modified`) as `modified`,
`oemail`.`CN`, `oemail`.`serial`, `oemail`.`id`,
`oemail`.`description`, `oemail`.`ou`, `orginfo`.`O`
from `orgemailcerts` as `oemail`, `org`, `orginfo`
@@ -92,17 +93,17 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c
if(0==$status)
{
$query .= "AND `oemail`.`revoked`=0 AND `oemail`.`renewed`=0 ";
- $query .= "HAVING `timeleft` > 0 AND `revoked`=0 ";
+ $query .= "HAVING `timeleft` > 0 AND `revoked`=0 or `expires` = 0 ";
}
switch ($sorting){
case 0:
- $query .= "ORDER BY `orginfo`.`O`, `oemail`.`expire` desc";
+ $query .= "ORDER BY `orginfo`.`O`, `modified` desc";
break;
case 1:
- $query .= "ORDER BY `orginfo`.`O`, `oemail`.`ou`, `oemail`.`expire` desc";
+ $query .= "ORDER BY `orginfo`.`O`, `oemail`.`ou`, `modified` desc";
break;
case 2:
- $query .= "ORDER BY `orginfo`.`O`, `oemail`.`CN`, `oemail`.`expire` desc";
+ $query .= "ORDER BY `orginfo`.`O`, `oemail`.`CN`, `modified` desc";
break;
}
$res = mysql_query($query);