bug 1138: Reorder if clauses for better readability
authorMichael Tänzer <neo@nhng.de>
Mon, 7 Apr 2014 13:52:20 +0000 (15:52 +0200)
committerMichael Tänzer <neo@nhng.de>
Mon, 7 Apr 2014 13:52:20 +0000 (15:52 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
includes/notary.inc.php

index c3351aa..3249bfe 100644 (file)
@@ -1679,58 +1679,58 @@ function output_client_cert($row, $support=0){
        ?>
        <tr>
        <?
-       if ($verified != _("Pending") && $verified != _("Revoked")) {
+       if ($verified == _("Pending")) {
                if (1 != $support) {
                        ?>
                        <td class="DataTD">
-                               <input type="checkbox" name="revokeid[]" value="<?=$row['id']?>">
+                               <input type="checkbox" name="delid[]" value="<?=$row['id']?>">
                        </td>
                        <?
                }
 
                ?>
                <td class="DataTD"><?=$verified?></td>
+               <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
                <?
 
+       } elseif ($verified == _("Revoked")) {
                if (1 != $support) {
                        ?>
-                       <td class="DataTD">
-                               <a href="account.php?id=6&amp;cert=<?=$row['id']?>">
-                                       <?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?>
-                               </a>
-                       </td>
-                       <?
-               } else {
-                       ?>
-                       <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
+                       <td class="DataTD">&nbsp;</td>
                        <?
                }
 
-       } elseif ($verified != _("Revoked")) {
+               ?>
+               <td class="DataTD"><?=$verified?></td>
+               <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
+               <?
+
+       } else {
                if (1 != $support) {
                        ?>
                        <td class="DataTD">
-                               <input type="checkbox" name="delid[]" value="<?=$row['id']?>">
+                               <input type="checkbox" name="revokeid[]" value="<?=$row['id']?>">
                        </td>
                        <?
                }
 
                ?>
                <td class="DataTD"><?=$verified?></td>
-               <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
                <?
 
-       } else {
                if (1 != $support) {
                        ?>
-                       <td class="DataTD">&nbsp;</td>
+                       <td class="DataTD">
+                               <a href="account.php?id=6&amp;cert=<?=$row['id']?>">
+                                       <?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?>
+                               </a>
+                       </td>
+                       <?
+               } else {
+                       ?>
+                       <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
                        <?
                }
-
-               ?>
-               <td class="DataTD"><?=$verified?></td>
-               <td class="DataTD"><?=(trim($row['CN'])=="" ? _("empty") : $row['CN'])?></td>
-               <?
        }
 
        ?>