Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- don't offer voting for urls if user is not authenticated at peer - removed possibility to raise priority of YaCy process

karlchenofhell88ee44930081
diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html
index 6d432cfaa..748904521 100644
--- a/htroot/PerformanceQueues_p.html
+++ b/htroot/PerformanceQueues_p.html
@@ -213,9 +213,6 @@
<dl>
<dt>YaCy Process Priority:</dt>
<dd><select name="YaCyPriority">
- <option value="-20"#(priority_realtime)#:: selected="selected"#(/priority_realtime)#>Realtime</option>
- <option value="-15"#(priority_high)#:: selected="selected"#(/priority_high)#>High</option>
- <option value="-10"#(priority_above)#:: selected="selected"#(/priority_above)#>Above normal</option>
<option value="0"#(priority_normal)#:: selected="selected"#(/priority_normal)#>Normal</option>
<option value="10"#(priority_below)#:: selected="selected"#(/priority_below)#>Below normal</option>
<option value="20"#(priority_low)#:: selected="selected"#(/priority_low)#>Idle</option>
diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java
index bc1d50f66..32155dc8d 100644
--- a/htroot/PerformanceQueues_p.java
+++ b/htroot/PerformanceQueues_p.java
@@ -315,9 +315,6 @@ public class PerformanceQueues_p {
prop.put("pool",3);
long curr_prio = switchboard.getConfigLong("javastart_priority",0);
- prop.put("priority_realtime",(curr_prio==-20)?1:0);
- prop.put("priority_high",(curr_prio==-15)?1:0);
- prop.put("priority_above",(curr_prio==-10)?1:0);
prop.put("priority_normal",(curr_prio==0)?1:0);
prop.put("priority_below",(curr_prio==10)?1:0);
prop.put("priority_low",(curr_prio==20)?1:0);
diff --git a/htroot/Surftips.java b/htroot/Surftips.java
index 6d567181b..352ede1ba 100644
--- a/htroot/Surftips.java
+++ b/htroot/Surftips.java
@@ -137,7 +137,7 @@ public class Surftips {
} catch (IOException e) {
e.printStackTrace();
}
- prop.put("surftips_results_" + i + "_recommend", (voted) ? 0 : 1);
+ prop.put("surftips_results_" + i + "_recommend", (voted || !authenticated) ? 0 : 1);
prop.put("surftips_results_" + i + "_recommend_negativeVoteLink", "/Surftips.html?voteNegative=" + urlhash + "&amp;refid=" + refid + "&amp,display=" + display + ((showScore) ? "&amp;score=" : "")); // for negaive votes, we don't send around the bad url again, the hash is enough
prop.put("surftips_results_" + i + "_recommend_positiveVoteLink", "/Surftips.html?votePositive=" + urlhash + "&amp;refid=" + refid + "&amp;url=" + crypt.simpleEncode(url,null,'b') + "&amp;title=" + crypt.simpleEncode(title,null,'b') + "&amp;description=" + crypt.simpleEncode(description,null,'b') + "&amp;display=" + display + ((showScore) ? "&amp;score=" : ""));
prop.put("surftips_results_" + i + "_url", de.anomic.data.wikiCode.replaceHTMLonly(url));
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 5e4c9067c..c09b60731 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -390,6 +390,13 @@ public class yacysearch {
prop.put("cat", "href");
prop.put("depth", depth);
}
+
+ // if user is not authenticated, he may not vote for URLs
+ if (!authenticated) {
+ int linkcount = Integer.parseInt(prop.get("num-results_linkcount", "0"));
+ for (int i=0; i<linkcount; i++)
+ prop.put("type_results_" + i + "_recommend", 0);
+ }
prop.put("promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("former", post.get("search", ""));
diff --git a/startYACY.bat b/startYACY.bat
index 33b8c0e7e..589fca8e6 100644
--- a/startYACY.bat
+++ b/startYACY.bat
@@ -49,9 +49,6 @@ if not defined port set port=8080
if defined priolvl (
if %priolvl% == 20 set priority=/LOW
if %priolvl% == 10 set priority=/BELOWNORMAL
- if %priolvl% == -10 set priority=/ABOVENORMAL
- if %priolvl% == -15 set priority=/HIGH
- if %priolvl% == -20 set priority=/REALTIME
)
GoTo :STARTJAVA
diff --git a/startYACY_noconsole.bat b/startYACY_noconsole.bat
index a048bd331..ea4937adc 100644
--- a/startYACY_noconsole.bat
+++ b/startYACY_noconsole.bat
@@ -38,9 +38,6 @@ if defined jms set javacmd=-%jms% %javacmd%
if defined priolvl (
if %priolvl% == 20 set priority=/LOW
if %priolvl% == 10 set priority=/BELOWNORMAL
- if %priolvl% == -10 set priority=/ABOVENORMAL
- if %priolvl% == -15 set priority=/HIGH
- if %priolvl% == -20 set priority=/REALTIME
)
GoTo :STARTJAVA