From 43c6a4ddac6755b43c3b4d2d245706b1af770211 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sun, 9 Nov 2014 14:33:26 +0000
Subject: [PATCH] fix some issues with tracker config form

---
 .../java/src/org/klomp/snark/web/I2PSnarkServlet.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index a085864c17..96d64bbcba 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -2343,9 +2343,9 @@ public class I2PSnarkServlet extends BasicServlet {
             String name = t.name;
             String homeURL = t.baseURL;
             String announceURL = t.announceURL.replace("&#61;", "=");
-            boolean isOpen = openTrackers.contains(t.announceURL);
             boolean isPrivate = privateTrackers.contains(t.announceURL);
             boolean isKnownOpen = _manager.util().isKnownOpenTracker(t.announceURL);
+            boolean isOpen = isKnownOpen || openTrackers.contains(t.announceURL);
             buf.append("<tr><td><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
                .append(name).append("\" title=\"").append(_("Delete")).append("\">" +
                        "</td><td>").append(name)
@@ -2369,9 +2369,10 @@ public class I2PSnarkServlet extends BasicServlet {
                .append(announceURL).append("\"");
             if (isPrivate) {
                 buf.append(" checked=\"checked\"");
-            } else {
-                if (isKnownOpen)
-                    buf.append(" disabled=\"disabled\"");
+            } else if (isKnownOpen ||
+                       t.announceURL.equals("http://diftracker.i2p/announce.php") ||
+                       t.announceURL.equals("http://tracker2.postman.i2p/announce.php")) {
+                buf.append(" disabled=\"disabled\"");
             }
             buf.append(">" +
                        "</td><td>").append(urlify(announceURL, 35))
-- 
GitLab