]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - server_bans.php
Server bans: don't list checkmark (for deletion) for config based bans,
[irc/unrealircd/unrealircd-webpanel.git] / server_bans.php
index fd009fe9ee5f607ffbfb46fe1c1ee0d046cd334a..6e9983b9665395b298863574939d162c0811f390 100644 (file)
@@ -211,13 +211,17 @@ foreach ($rpc->serverbanexception()->getAll() as $v)
        <?php
                foreach($tkl as $tkl)
                {
+                       $set_in_config = ((isset($tkl->set_in_config) && $tkl->set_in_config) || ($tkl->set_by == "-config-")) ? true : false;
                        echo "<tr>";
-                       echo "<td><input type=\"checkbox\" value='" . base64_encode($tkl->name).",".base64_encode($tkl->type) . "' name=\"tklch[]\"></td>";
+                       if ($set_in_config)
+                               echo "<td></td>";
+                       else
+                               echo "<td><input type=\"checkbox\" value='" . base64_encode($tkl->name).",".base64_encode($tkl->type) . "' name=\"tklch[]\"></td>";
                        echo "<td>".$tkl->name."</td>";
                        echo "<td>".$tkl->type_string."</td>";
                        echo "<td>".$tkl->duration_string."</td>";
                        echo "<td>".$tkl->reason."</td>";
-                       $set_by = ($tkl->set_by == "-config-") ? "<span class=\"badge-pill badge-secondary\">Config</span>" : show_nick_only($tkl->set_by);
+                       $set_by = $set_in_config ? "<span class=\"badge-pill badge-secondary\">Config</span>" : show_nick_only($tkl->set_by);
                        echo "<td>".$set_by."</td>";
                        echo "<td>".$tkl->set_at_string."</td>";
                        echo "<td>".$tkl->expire_at_string."</td>";