mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
Merge branch 'master' of ssh://git@gitorious.org/yacy/rc1.git
This commit is contained in:
commit
3e552550d1
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user