|
|
|
@ -24,9 +24,7 @@
|
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
|
import java.net.MalformedURLException;
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.TreeSet;
|
|
|
|
|
|
|
|
|
@ -116,8 +114,8 @@ public class yacysearchitem {
|
|
|
|
|
|
|
|
|
|
prop.put("content_authorized", authenticated ? "1" : "0");
|
|
|
|
|
prop.put("content_authorized_recommend", (sb.peers.newsPool.getSpecific(yacyNewsPool.OUTGOING_DB, yacyNewsPool.CATEGORY_SURFTIPP_ADD, "url", result.urlstring()) == null) ? "1" : "0");
|
|
|
|
|
prop.putHTML("content_authorized_recommend_deletelink", "/yacysearch.html?search=" + theQuery.queryString + "&Enter=Search&count=" + theQuery.displayResults() + "&offset=" + (theQuery.neededResults() - theQuery.displayResults()) + "&order=" + crypt.simpleEncode(theQuery.ranking.toExternalString()) + "&resource=local&time=3&deleteref=" + new String(result.hash()) + "&urlmaskfilter=.*");
|
|
|
|
|
prop.putHTML("content_authorized_recommend_recommendlink", "/yacysearch.html?search=" + theQuery.queryString + "&Enter=Search&count=" + theQuery.displayResults() + "&offset=" + (theQuery.neededResults() - theQuery.displayResults()) + "&order=" + crypt.simpleEncode(theQuery.ranking.toExternalString()) + "&resource=local&time=3&recommendref=" + new String(result.hash()) + "&urlmaskfilter=.*");
|
|
|
|
|
prop.putHTML("content_authorized_recommend_deletelink", "/yacysearch.html?query=" + theQuery.queryString.replace(' ', '+') + "&Enter=Search&count=" + theQuery.displayResults() + "&offset=" + (theQuery.neededResults() - theQuery.displayResults()) + "&order=" + crypt.simpleEncode(theQuery.ranking.toExternalString()) + "&resource=local&time=3&deleteref=" + new String(result.hash()) + "&urlmaskfilter=.*");
|
|
|
|
|
prop.putHTML("content_authorized_recommend_recommendlink", "/yacysearch.html?query=" + theQuery.queryString.replace(' ', '+') + "&Enter=Search&count=" + theQuery.displayResults() + "&offset=" + (theQuery.neededResults() - theQuery.displayResults()) + "&order=" + crypt.simpleEncode(theQuery.ranking.toExternalString()) + "&resource=local&time=3&recommendref=" + new String(result.hash()) + "&urlmaskfilter=.*");
|
|
|
|
|
prop.put("content_authorized_urlhash", new String(result.hash()));
|
|
|
|
|
String resulthashString = new String(result.hash());
|
|
|
|
|
prop.putHTML("content_title", result.title());
|
|
|
|
@ -142,9 +140,9 @@ public class yacysearchitem {
|
|
|
|
|
prop.putHTML("content_creator", result.creator());// author
|
|
|
|
|
prop.putHTML("content_subject", result.subject());
|
|
|
|
|
final TreeSet<String>[] query = theQuery.queryWords();
|
|
|
|
|
try {
|
|
|
|
|
prop.putHTML("content_words", URLEncoder.encode(query[0].toString(),"UTF-8"));
|
|
|
|
|
} catch (final UnsupportedEncodingException e) {}
|
|
|
|
|
String s = ""; for (String t: query[0]) s += "+" + t;
|
|
|
|
|
if (s.length() > 0) s = s.substring(1);
|
|
|
|
|
prop.putHTML("content_words", s);
|
|
|
|
|
prop.putHTML("content_former", theQuery.queryString);
|
|
|
|
|
final TextSnippet snippet = result.textSnippet();
|
|
|
|
|
final String desc = (snippet == null) ? "" : snippet.getLineMarked(theQuery.fullqueryHashes);
|
|
|
|
|