diff options
author | INOPIAE <inopiae@cacert.org> | 2014-02-23 10:58:27 +0100 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2014-02-23 10:58:27 +0100 |
commit | 71489928fd0a21ddfe5135795af0f6de8b7397fc (patch) | |
tree | 70bd1c108c73467b6deaafb387c96fca56a2d3e3 | |
parent | 89d99bee4d8fd38a66a7f812bd23cb9eb2bcc259 (diff) | |
download | cacert-devel-71489928fd0a21ddfe5135795af0f6de8b7397fc.tar.gz cacert-devel-71489928fd0a21ddfe5135795af0f6de8b7397fc.tar.xz cacert-devel-71489928fd0a21ddfe5135795af0f6de8b7397fc.zip |
bug 413: modified sql statement for org server certs
-rw-r--r-- | pages/account/18.php | 2 | ||||
-rw-r--r-- | pages/account/22.php | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pages/account/18.php b/pages/account/18.php index d295894..ca0a3c8 100644 --- a/pages/account/18.php +++ b/pages/account/18.php @@ -93,7 +93,7 @@ $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 or `expires` = 0 "; + $query .= "HAVING `timeleft` > 0 AND `revoked`=0 or `expires` = 0 "; } switch ($sorting){ case 0: diff --git a/pages/account/22.php b/pages/account/22.php index 0413da0..7b7db2d 100644 --- a/pages/account/22.php +++ b/pages/account/22.php @@ -78,7 +78,9 @@ $status = array_key_exists('dstatus',$_SESSION['_config']) ? intval($_SESSION['_ UNIX_TIMESTAMP(`orgdomaincerts`.`expire`) - UNIX_TIMESTAMP() as `timeleft`, UNIX_TIMESTAMP(`orgdomaincerts`.`expire`) as `expired`, `orgdomaincerts`.`expire` as `expires`, `revoked` as `revoke`, - UNIX_TIMESTAMP(`revoked`) as `revoked`, `CN`, + UNIX_TIMESTAMP(`orgdomaincerts`.`revoked`) as `revoked`, + if (`orgdomaincerts`.`expire`=0,CURRENT_TIMESTAMP(),`orgdomaincerts`.`modified`) as `modified`, + `CN`, `orgdomaincerts`.`serial`, `orgdomaincerts`.`id` as `id`, `orgdomaincerts`.`description`, `orginfo`.`O` @@ -94,14 +96,14 @@ $status = array_key_exists('dstatus',$_SESSION['_config']) ? intval($_SESSION['_ if(0==$status) { $query .= "AND `revoked`=0 AND `renewed`=0 "; - $query .= "HAVING `timeleft` > 0 "; + $query .= "HAVING `timeleft` > 0 or `expires` = 0 "; } switch ($sorting){ case 0: - $query .= "ORDER BY `orginfo`.`O`, `orgdomaincerts`.`expire` desc"; + $query .= "ORDER BY `orginfo`.`O`, `modified` desc"; break; case 1: - $query .= "ORDER BY `orginfo`.`O`, `orgdomaincerts`.`CN`, `orgdomaincerts`.`expire` desc"; + $query .= "ORDER BY `orginfo`.`O`, `orgdomaincerts`.`CN`, `modified` desc"; break; } |