diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index 6a60aaea8..87432535e 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -14,15 +14,12 @@ See the page info about the url. - - #(display)# - #%env/templates/simpleheader.template%# - :: - #%env/templates/header.template%# - #%env/templates/submenuIndexControl.template%# - :: + #(topmenu)# #%env/templates/embeddedheader.template%# - #(/display)# + :: + #%env/templates/simpleheader.template%# + #(/topmenu)# +

View URL Content

diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java index 7e2ab1674..fb97741d0 100644 --- a/htroot/ViewFile.java +++ b/htroot/ViewFile.java @@ -76,10 +76,9 @@ public class ViewFile { final serverObjects prop = new serverObjects(); final Switchboard sb = (Switchboard)env; + prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0); if (post == null) { - prop.put("display", 1); - prop.put("error_display", 0); prop.putHTML("error_words", ""); prop.put("error_vMode-sentences", "1"); prop.put("error", "1"); @@ -88,8 +87,6 @@ public class ViewFile { return prop; } - final int display = post.getInt("display", 1); - // get segment Segment indexSegment = null; final boolean authorized = sb.verifyAuthentication(header); @@ -99,9 +96,6 @@ public class ViewFile { indexSegment = sb.indexSegments.segment(Segments.Process.PUBLIC); } - prop.put("display", display); - prop.put("error_display", display); - if (post.containsKey("words")) prop.putHTML("error_words", post.get("words")); else { @@ -212,7 +206,9 @@ public class ViewFile { } else if (viewMode.equals("iframeCache")) { prop.put("viewMode", VIEW_MODE_AS_IFRAME_FROM_CACHE); final String ext = url.getFileExtension(); - if ("jpg.jpeg.png.gif".indexOf(ext) >= 0) { + prop.put("viewMode_png", 0); + prop.put("viewMode_html", 0); + if (ext.length() > 0 && "jpg.jpeg.png.gif".indexOf(ext) >= 0) { prop.put("viewMode_png", 1); prop.put("viewMode_png_url", url.toNormalform(false, true)); } else { diff --git a/htroot/api/yacydoc.html b/htroot/api/yacydoc.html index 45f13fe59..de67fd7aa 100644 --- a/htroot/api/yacydoc.html +++ b/htroot/api/yacydoc.html @@ -31,7 +31,7 @@ you can validate it with http://validator.w3.org/
Date
#[dc_date]#
Type
yacy:doctype:#[dc_type]#
YaCy Identifier
yacy:urlhash:#[yacy_urlhash]#
-
Identifier
#[dc_identifier]#
+
Identifier
#[dc_identifier]#
Language
#[dc_language]#
Load Date
#[yacy_loaddate]#
diff --git a/htroot/api/yacydoc.java b/htroot/api/yacydoc.java index 1599243ea..71565d4bc 100644 --- a/htroot/api/yacydoc.java +++ b/htroot/api/yacydoc.java @@ -29,7 +29,6 @@ import java.net.MalformedURLException; import net.yacy.cora.date.ISO8601Formatter; import net.yacy.cora.document.ASCII; -import net.yacy.cora.document.UTF8; import net.yacy.cora.protocol.RequestHeader; import net.yacy.kelondro.data.meta.DigestURI; import net.yacy.kelondro.data.meta.URIMetadataRow; @@ -103,7 +102,7 @@ public class yacydoc { prop.putXML("dc_date", ISO8601Formatter.FORMATTER.format(entry.moddate())); prop.putXML("dc_type", String.valueOf(entry.doctype())); prop.putXML("dc_identifier", metadata.url().toNormalform(false, true)); - prop.putXML("dc_language", UTF8.String(entry.language())); + prop.putXML("dc_language", ASCII.String(entry.language())); prop.put("geo_lat", metadata.lat()); prop.put("geo_long", metadata.lon()); diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html index 3a76dcbb0..d61ac016b 100644 --- a/htroot/yacysearch.html +++ b/htroot/yacysearch.html @@ -41,7 +41,6 @@ - - #(topmenu)# #%env/templates/embeddedheader.template%# :: @@ -81,7 +79,6 @@ To see a list of all APIs, please visit the // #(showDate)#::#[date]##(/showDate)# #(showSize)#:: | #[sizename]##(/showSize)# - #(showMetadata)#:: | Metadata#(/showMetadata)# - #(showParser)#:: | Parser#(/showParser)# + #(showMetadata)#:: | Metadata#(/showMetadata)# + #(showParser)#:: | Parser#(/showParser)# #(showPictures)#:: | Pictures

#(/showPictures)# :: diff --git a/source/net/yacy/cora/document/MultiProtocolURI.java b/source/net/yacy/cora/document/MultiProtocolURI.java index 9f33f4670..62ee4f994 100644 --- a/source/net/yacy/cora/document/MultiProtocolURI.java +++ b/source/net/yacy/cora/document/MultiProtocolURI.java @@ -694,6 +694,12 @@ public class MultiProtocolURI implements Serializable, Comparable 2) return ASCII.getBytes("en"); + return ASCII.getBytes(tld); + } + return b; } public int size() {