- don't offer voting for urls if user is not authenticated at peer

- removed possibility to raise priority of YaCy process

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3156 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
karlchenofhell 18 years ago
parent 727b64e793
commit 88ee449300

@ -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>

@ -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);

@ -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));

@ -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", ""));

@ -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

@ -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

Loading…
Cancel
Save