summaryrefslogtreecommitdiff
path: root/pages/account/18.php
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2014-06-13 09:19:57 +0200
committerBenny Baumann <BenBE@geshi.org>2014-06-13 09:19:57 +0200
commitf25f8af03c96cfcd4dd83a9f3b6ee4181eb3e2c9 (patch)
tree7162d1c77760fad5c53474d9bf0a0c7e122b2f66 /pages/account/18.php
parent57ba86ff84eb3dcc15f8122b29efeae54434652e (diff)
parent2affa9c6e9a1f2a7f68ab5fa306374cd037d6227 (diff)
downloadcacert-devel-f25f8af03c96cfcd4dd83a9f3b6ee4181eb3e2c9.tar.gz
cacert-devel-f25f8af03c96cfcd4dd83a9f3b6ee4181eb3e2c9.tar.xz
cacert-devel-f25f8af03c96cfcd4dd83a9f3b6ee4181eb3e2c9.zip
Merge branch 'release' into bug-807
Conflicts: includes/account.php includes/lib/account.php pages/account/16.php
Diffstat (limited to 'pages/account/18.php')
-rw-r--r--pages/account/18.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/pages/account/18.php b/pages/account/18.php
index 9ab13b2..ca0a3c8 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);