From 979656f09cdf984fe1afb5aedbe51370f02e7279 Mon Sep 17 00:00:00 2001 From: allo Date: Thu, 18 Jan 2007 16:53:31 +0000 Subject: [PATCH] fix broken voteURLs && use nice Templates for voteURLs git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3247 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Surftips.html | 4 ++-- htroot/Surftips.java | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htroot/Surftips.html b/htroot/Surftips.html index 674bbff59..08faf3279 100644 --- a/htroot/Surftips.html +++ b/htroot/Surftips.html @@ -38,8 +38,8 @@ :: - Give positive vote - Give negative vote + Give positive vote + Give negative vote #(/recommend)# #(/authorized)# diff --git a/htroot/Surftips.java b/htroot/Surftips.java index 2868efd35..d560b15e7 100644 --- a/htroot/Surftips.java +++ b/htroot/Surftips.java @@ -139,8 +139,15 @@ public class Surftips { } prop.put("surftips_results_" + i + "_authorized", (authenticated) ? 1 : 0); prop.put("surftips_results_" + i + "_authorized_recommend", (voted) ? 0 : 1); - prop.put("surftips_results_" + i + "_authorized_recommend_negativeVoteLink", "/Surftips.html?voteNegative=" + urlhash + "&refid=" + refid + "&,display=" + display + ((showScore) ? "&score=" : "")); // for negaive votes, we don't send around the bad url again, the hash is enough - prop.put("surftips_results_" + i + "_authorized_recommend_positiveVoteLink", "/Surftips.html?votePositive=" + urlhash + "&refid=" + refid + "&url=" + crypt.simpleEncode(url,null,'b') + "&title=" + crypt.simpleEncode(title,null,'b') + "&description=" + crypt.simpleEncode(description,null,'b') + "&display=" + display + ((showScore) ? "&score=" : "")); + + prop.put("surftips_results_" + i + "_authorized_recommend_urlhash", urlhash); + prop.put("surftips_results_" + i + "_authorized_recommend_refid", refid); + prop.putASIS("surftips_results_" + i + "_authorized_recommend_url", crypt.simpleEncode(url, null, 'b')); + prop.putASIS("surftips_results_" + i + "_authorized_recommend_title", crypt.simpleEncode(title, null, 'b')); + prop.putASIS("surftips_results_" + i + "_authorized_recommend_description", crypt.simpleEncode(description, null, 'b')); + prop.put("surftips_results_" + i + "_authorized_recommend_display", display); + prop.put("surftips_results_" + i + "_authorized_recommend_showScore", (showScore ? 1 : 0)); + prop.put("surftips_results_" + i + "_authorized_urlhash", urlhash); prop.put("surftips_results_" + i + "_url", de.anomic.data.wikiCode.replaceXMLEntities(url)); prop.put("surftips_results_" + i + "_urlname", nxTools.shortenURLString(url, 60));