Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git

This commit is contained in:
orbiter 2013-11-18 22:48:00 +01:00
commit 3e552550d1
2 changed files with 8 additions and 2 deletions

View File

@ -242,6 +242,7 @@ function yacysearch(clear) {
param[i] = item; param[i] = item;
}); });
param[param.length] = { name : 'startRecord', value : startRecord }; param[param.length] = { name : 'startRecord', value : startRecord };
ycurr = ycurr.replace("<"," ").replace(">"," ");
$.ajaxSetup({ $.ajaxSetup({
timeout: 10000, timeout: 10000,
@ -274,7 +275,7 @@ function yacysearch(clear) {
else data = json; else data = json;
var searchTerms = ""; var searchTerms = "";
searchTerms = data.channels[0].searchTerms; searchTerms = data.channels[0].searchTerms.replace("<"," ").replace(">"," ");;
if($.trim(ycurr.replace(/ /g,"+")) != searchTerms) { if($.trim(ycurr.replace(/ /g,"+")) != searchTerms) {
return false; return false;

View File

@ -141,7 +141,12 @@ public class ResultEntry implements Comparable<ResultEntry>, Comparator<ResultEn
return (this.alternative_urlname == null) ? MultiProtocolURL.unescape(this.urlentry.url().toNormalform(true)) : this.alternative_urlname; return (this.alternative_urlname == null) ? MultiProtocolURL.unescape(this.urlentry.url().toNormalform(true)) : this.alternative_urlname;
} }
public String title() { public String title() {
return this.urlentry.dc_title(); String titlestr = this.urlentry.dc_title();
// if title is empty use filename as title
if (titlestr.isEmpty()) { // if url has no filename, title is still empty (e.g. "www.host.com/" )
titlestr = this.urlentry.url() != null ? this.urlentry.url().getFileName() : "";
}
return titlestr;
} }
public String publisher() { public String publisher() {
// dc:publisher // dc:publisher