Merge remote-tracking branch 'original yacy/master'

pull/1/head
cominch 13 years ago
commit 8cf47a8335

@ -130,10 +130,10 @@ function updatepage(str) {
#{terms}# #{terms}#
<tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#"> <tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
<td align="center">#(editable)#&nbsp;::<input type="checkbox" name="modify_#[term]#" id="modify_#[term]#" value="checked" disabled="disabled"/>#(/editable)#</td> <td align="center">#(editable)#&nbsp;::<input type="checkbox" name="modify_#[term]#" id="modify_#[term]#" value="checked" disabled="disabled"/>#(/editable)#</td>
<td align="center">#(editable)#&nbsp;::<input type="checkbox" name="delete_#[term]#" id="delete_#[term]#" value="checked" onchange="this.form.submit()"/>#(/editable)#</td> <td align="center">#(editable)#&nbsp;::<input type="checkbox" name="delete_#[term]#" id="delete_#[term]#" value="checked" />#(/editable)#</td>
<td align="left">#[term]#</td> <td align="left">#[term]#</td>
<td align="left">#(editable)##[synonyms]#::<input type="text" name="synonyms_#[term]#" value="#[synonyms]#" size="40" maxlength="1024" onkeyup="document.getElementById('modify_#[term]#').checked='checked'; document.getElementById('modify_#[term]#').disabled=''"/>#(/editable)#</td> <td align="left">#(editable)##[synonyms]#::<input type="text" name="synonyms_#[term]#" value="#[synonyms]#" size="40" maxlength="1024" onkeyup="document.getElementById('modify_#[term]#').checked='checked'; document.getElementById('modify_#[term]#').disabled=''; document.getElementById('delete_#[term]#').disabled='disabled';"/>#(/editable)#</td>
<td align="left">#(editable)##[objectlink]#::<input type="text" name="objectlink_#[term]#" value="#[objectlink]#" size="60" maxlength="1024" onkeyup="document.getElementById('modify_#[term]#').checked='checked'; document.getElementById('modify_#[term]#').disabled=''"/>#(/editable)#</td> <td align="left">#(editable)##[objectlink]#::<input type="text" name="objectlink_#[term]#" value="#[objectlink]#" size="60" maxlength="1024" onkeyup="document.getElementById('modify_#[term]#').checked='checked'; document.getElementById('modify_#[term]#').disabled=''; document.getElementById('delete_#[term]#').disabled='disabled';"/>#(/editable)#</td>
</tr> </tr>
#{/terms}# #{/terms}#
#(editable)#:: #(editable)#::

@ -201,7 +201,9 @@ public class Vocabulary_p {
prop.putHTML("edit_tripleN", vocabulary.getObjectspace() == null ? "none - missing objectspace" : "<" + yacyurl + "> <" + DCTerms.references.getPredicate() + "> \"[reference-link]#[tag]\" ."); prop.putHTML("edit_tripleN", vocabulary.getObjectspace() == null ? "none - missing objectspace" : "<" + yacyurl + "> <" + DCTerms.references.getPredicate() + "> \"[reference-link]#[tag]\" .");
int c = 0; int c = 0;
boolean dark = false; boolean dark = false;
for (Map.Entry<String, SOTuple> entry: vocabulary.list().entrySet()) { Map<String, SOTuple> list = vocabulary.list();
prop.put("edit_size", list.size());
for (Map.Entry<String, SOTuple> entry: list.entrySet()) {
prop.put("edit_terms_" + c + "_editable", editable ? 1 : 0); prop.put("edit_terms_" + c + "_editable", editable ? 1 : 0);
prop.put("edit_terms_" + c + "_dark", dark ? 1 : 0); dark = !dark; prop.put("edit_terms_" + c + "_dark", dark ? 1 : 0); dark = !dark;
prop.putHTML("edit_terms_" + c + "_term", entry.getKey()); prop.putHTML("edit_terms_" + c + "_term", entry.getKey());
@ -212,6 +214,7 @@ public class Vocabulary_p {
if (c > 3000) break; if (c > 3000) break;
} }
prop.put("edit_terms", c); prop.put("edit_terms", c);
} }
// return rewrite properties // return rewrite properties

@ -602,7 +602,7 @@ public final class HTTPDemon implements serverHandler, Cloneable {
} }
// setting other connection properties // setting other connection properties
prop.put(HeaderFramework.CONNECTION_PROP_CLIENTIP, session.userAddress.isAnyLocalAddress() ? "localhost" : session.userAddress.getHostAddress()); prop.put(HeaderFramework.CONNECTION_PROP_CLIENTIP, session.userAddress.isAnyLocalAddress() || session.userAddress.isLinkLocalAddress() || session.userAddress.isLoopbackAddress() ? "localhost" : session.userAddress.getHostAddress());
prop.put(HeaderFramework.CONNECTION_PROP_METHOD, HeaderFramework.METHOD_CONNECT); prop.put(HeaderFramework.CONNECTION_PROP_METHOD, HeaderFramework.METHOD_CONNECT);
prop.put(HeaderFramework.CONNECTION_PROP_PATH, "/"); prop.put(HeaderFramework.CONNECTION_PROP_PATH, "/");
prop.put(HeaderFramework.CONNECTION_PROP_EXT, ""); prop.put(HeaderFramework.CONNECTION_PROP_EXT, "");

@ -885,6 +885,7 @@ public class Domains {
"127.0.0.1".equals(host) || "127.0.0.1".equals(host) ||
"localhost".equals(host) || "localhost".equals(host) ||
host.startsWith("0:0:0:0:0:0:0:1") || host.startsWith("0:0:0:0:0:0:0:1") ||
host.startsWith("fe80:0:0:0:0:0:0:1") || // used by my mac as localhost
host.startsWith("::1/") || host.startsWith("::1/") ||
"::1".equals(host) "::1".equals(host)
); );

@ -233,7 +233,7 @@ public class LibraryProvider {
// store the term into the vocabulary map // store the term into the vocabulary map
map.put(term, new SOTuple(Tagging.normalizeTerm(term), subject)); map.put(term, new SOTuple(Tagging.normalizeTerm(term), subject));
} }
try { if (map.size() > 0) try {
Log.logInfo("LibraryProvider", "adding vocabulary to autotagging"); Log.logInfo("LibraryProvider", "adding vocabulary to autotagging");
Tagging pndVoc = new Tagging("Persons", null, objectspace, map); Tagging pndVoc = new Tagging("Persons", null, objectspace, map);
autotagging.addVocabulary(pndVoc); autotagging.addVocabulary(pndVoc);

@ -48,9 +48,10 @@ public class OAIPMHLoader {
this.source = source; this.source = source;
// load the file from the net // load the file from the net
Log.logInfo("OAIPMHLoader", "loading record from " + source.toNormalform(true, false));
Response response = null; Response response = null;
IOException ee = null; IOException ee = null;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 5; i++) {
// make some retries if first attempt fails // make some retries if first attempt fails
try { try {
response = loader.load(loader.request(source, false, true), CacheStrategy.NOCACHE, Integer.MAX_VALUE, true); response = loader.load(loader.request(source, false, true), CacheStrategy.NOCACHE, Integer.MAX_VALUE, true);

@ -1048,9 +1048,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
try { try {
final URL url = new URL(seedURL); final URL url = new URL(seedURL);
final String host = url.getHost(); final String host = url.getHost();
if ( host.equals("localhost") if (Domains.isLocalhost(host)) {
|| host.startsWith("127.")
|| (host.startsWith("0:0:0:0:0:0:0:1")) ) {
return "seedURL in localhost rejected"; return "seedURL in localhost rejected";
} }
} catch ( final MalformedURLException e ) { } catch ( final MalformedURLException e ) {

Loading…
Cancel
Save