summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-04-11 23:00:01 +0200
committerMichael Tänzer <neo@nhng.de>2014-04-11 23:00:01 +0200
commit4055bb2b6e1880b27ea53638d7391f40f58f292a (patch)
tree4b4396c8a7aaf726138d11e2582beac459b24abc
parentf08bf6cc3b13a71a1dca7a0bd0c54beaaa69563e (diff)
downloadcacert-devel-4055bb2b6e1880b27ea53638d7391f40f58f292a.tar.gz
cacert-devel-4055bb2b6e1880b27ea53638d7391f40f58f292a.tar.xz
cacert-devel-4055bb2b6e1880b27ea53638d7391f40f58f292a.zip
bug 1138: simplify logic for email address output styling
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--includes/notary.inc.php16
1 files changed, 7 insertions, 9 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index aebc0b3..228ab68 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -1475,19 +1475,17 @@ function output_log_email_header(){
* @param string $primary - if given the primary address is highlighted
*/
function output_log_email($row, $primary){
- $primaryemailaddress='';
- $deletedemailaddress='';
+ $style = '';
if ($row['deleted'] !== NULL_DATETIME) {
- $deletedemailaddress=' deletedemailaddress';
- }
- if ($primary==$row['email'] && $row['deleted'] === NULL_DATETIME) {
- $primaryemailaddress= ' primaryemailaddress';
+ $style = ' deletedemailaddress';
+ } elseif ($primary == $row['email']) {
+ $style = ' primaryemailaddress';
}
?>
<tr>
- <td class="DataTD<?= $primaryemailaddress . $deletedemailaddress ?>"><?=$row['email']?></td>
- <td class="DataTD<?= $primaryemailaddress . $deletedemailaddress ?>"><?=$row['created']?></td>
- <td class="DataTD<?= $primaryemailaddress . $deletedemailaddress ?>"><?=$row['deleted']?></td>
+ <td class="DataTD<?=$style?>"><?=$row['email']?></td>
+ <td class="DataTD<?=$style?>"><?=$row['created']?></td>
+ <td class="DataTD<?=$style?>"><?=$row['deleted']?></td>
</tr>
<?
}