Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- release information retrieval only on demand of user. Must be admin. the option is only presented if it is known that there is somewhere another more recent version - removed some old code - disabled online-mode presentation. the code is not yet removed until decision about future usability is made. (not all countries have DSL for everyone)
orbitere0d6d5bacf89
diff --git a/htroot/Status.html b/htroot/Status.htmlindex 24acc605a..f8abf2565 100644--- a/htroot/Status.html+++ b/htroot/Status.html@@ -29,7 +29,16 @@<tr class="TableHeader"><td colspan="2"><strong>Public System Properties</strong></td></tr><tr class="TableCellLight"><td>System version</td><td>#[versionpp]#- #(versioncomment)#:: - the latest public version is #[latestVersion]#.+ #(versioncomment)#+ :: - the latest public version is #[latestVersion]#.+ You can download a more recent version of YaCy. Click here to aquire a direct download location:+ <form action="Status.html" method="get" class="PeerControl">+ <button type="submit" name="aquirerelease" value="aquire release information">+ <img src="/env/grafics/lock.gif"/>+ aquire download location+ </button>+ </form>+ ::You can download the latest releases here:<br>#[versionResMain]#<br>#[versionResDev]#@@ -74,6 +83,7 @@#(/peerStatus)#</td></tr><tr class="TableCellDark"><td>Other peers</td><td>#(otherPeers)#not online::#[num]# other peers online.#(/otherPeers)#</td></tr>+ <!-- temporary disabled information, may be outdated. No decision made if this function should remain<tr class="TableCellLight"><td>Online-mode</td><td>#(omode)#You are in <em>Cache-browsing</em> mode.<br />@@ -99,7 +109,7 @@<input type="submit" name="cmode" value="Go to Cache-Mode" /></div></form>#(/omode)#- </td></tr>+ </td></tr>--></table>#(showPrivateTable)#Click here to <a href="Status.html?login=">log in</a> as administrator and see full status.diff --git a/htroot/Status.java b/htroot/Status.javaindex 50f0c4723..ca2ebc1f4 100644--- a/htroot/Status.java+++ b/htroot/Status.java@@ -72,56 +72,14 @@ public class Status {// return variable that accumulates replacementsfinal serverObjects prop = new serverObjects();- if (post != null) {- if (post.containsKey("login")) {- if (((plasmaSwitchboard) env).adminAuthenticated(header) < 2) {- prop.put("AUTHENTICATE","admin log-in");- } else {- prop.put("LOCATION","");- }+ if ((post != null) && (post.containsKey("login"))) {+ if (((plasmaSwitchboard) env).adminAuthenticated(header) < 2) {+ prop.put("AUTHENTICATE","admin log-in");} else {- if (post.containsKey("pauseCrawlJob")) {- String jobType = (String) post.get("jobType");- if (jobType.equals("localCrawl"))- ((plasmaSwitchboard)env).pauseCrawlJob(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL);- else if (jobType.equals("remoteTriggeredCrawl"))- ((plasmaSwitchboard)env).pauseCrawlJob(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL);- else if (jobType.equals("globalCrawlTrigger"))- ((plasmaSwitchboard)env).pauseCrawlJob(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER);- } else if (post.containsKey("continueCrawlJob")) {- String jobType = (String) post.get("jobType");- if (jobType.equals("localCrawl"))- ((plasmaSwitchboard)env).continueCrawlJob(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL);- else if (jobType.equals("remoteTriggeredCrawl"))- ((plasmaSwitchboard)env).continueCrawlJob(plasmaSwitchboard.CRAWLJOB_REMOTE_TRIGGERED_CRAWL);- else if (jobType.equals("globalCrawlTrigger"))- ((plasmaSwitchboard)env).continueCrawlJob(plasmaSwitchboard.CRAWLJOB_GLOBAL_CRAWL_TRIGGER);- } else if (post.containsKey("ResetTraffic")) {- httpdByteCountInputStream.resetCount();- httpdByteCountOutputStream.resetCount();- //enables or disables the browser popup on Yacy-start- } else if (post.containsKey("popup")) {- String trigger_enabled = (String) post.get("popup");- if (trigger_enabled.equals("false")) {- env.setConfig("browserPopUpTrigger", "false");- } else if (trigger_enabled.equals("true")){- env.setConfig("browserPopUpTrigger", "true");- }- }-- /*- } else if (post.containsKey("popup")) {- env.setConfig("browserPopUpTrigger", "false");- prop.put("info", 9); //popup disabled- } else if (post.containsKey("enpop")) {- env.setConfig("browserPopUpTrigger", "true");- prop.put("info", 10); //popup enabled- } */-prop.put("LOCATION","");}return prop;- }+ }/*versionProbe=http://www.anomic.de/AnomicHTTPProxy/release.txt@@ -130,7 +88,8 @@ public class Status {// update seed infoyacyCore.peerActions.updateMySeed();- if (((plasmaSwitchboard) env).adminAuthenticated(header) >= 2) {+ boolean adminaccess = ((plasmaSwitchboard) env).adminAuthenticated(header) >= 2;+ if (adminaccess) {prop.put("showPrivateTable",1);prop.put("privateStatusTable", "Status_p.inc");} else {@@ -156,12 +115,19 @@ public class Status {double thisVersion = Double.parseDouble(env.getConfig("version","0.1"));// cut off the SVN Rev in the Versiontry {thisVersion = Math.round(thisVersion*1000.0)/1000.0;} catch (NumberFormatException e) {}- if (yacyVersion.latestRelease >= (thisVersion+0.01)) { // only new Versions(not new SVN)- prop.put("versioncomment", 1); // new version+ if ((adminaccess) && (yacyVersion.latestRelease >= (thisVersion+0.01))) { // only new Versions(not new SVN)+ if ((yacyVersion.latestMainRelease != null) ||+ (yacyVersion.latestDevRelease != null)) {+ prop.put("versioncomment", 2);+ } else if ((post != null) && (post.containsKey("aquirerelease"))) {+ yacyVersion.aquireLatestReleaseInfo();+ prop.put("versioncomment", 2);+ } else {+ prop.put("versioncomment", 1);+ }} else {prop.put("versioncomment", 0); // no comment}- yacyVersion.aquireLatestReleaseInfo();prop.putASIS("versioncomment_versionResMain", (yacyVersion.latestMainRelease == null) ? "-" : yacyVersion.latestMainRelease.toAnchor());prop.putASIS("versioncomment_versionResDev", (yacyVersion.latestDevRelease == null) ? "-" : yacyVersion.latestDevRelease.toAnchor());prop.put("versioncomment_latestVersion", Double.toString(yacyVersion.latestRelease));