Skip to content

Commit

Permalink
show the cache link in search results only if there is actually a cache
Browse files Browse the repository at this point in the history
entry stored in HTCACHE
  • Loading branch information
Orbiter committed Jun 9, 2013
1 parent 713a619 commit 200769d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htroot/yacysearchitem.java
Expand Up @@ -37,6 +37,7 @@
import net.yacy.cora.protocol.HeaderFramework;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.cora.protocol.RequestHeader.FileType;
import net.yacy.crawler.data.Cache;
import net.yacy.data.URLLicense;
import net.yacy.kelondro.data.meta.DigestURI;
import net.yacy.kelondro.logging.Log;
Expand Down Expand Up @@ -133,7 +134,7 @@ public static serverObjects respond(final RequestHeader header, final serverObje
prop.put("content_showMetadata", sb.getConfigBool("search.result.show.metadata", true) ? 1 : 0);
prop.put("content_showParser", sb.getConfigBool("search.result.show.parser", true) ? 1 : 0);
prop.put("content_showPictures", sb.getConfigBool("search.result.show.pictures", true) ? 1 : 0);
prop.put("content_showCache", sb.getConfigBool("search.result.show.cache", true) ? 1 : 0);
prop.put("content_showCache", sb.getConfigBool("search.result.show.cache", true) && Cache.has(resultURL.hash()) ? 1 : 0);
prop.put("content_showProxy", sb.getConfigBool("search.result.show.proxy", true) ? 1 : 0);
prop.put("content_showHostBrowser", sb.getConfigBool("search.result.show.hostbrowser", true) ? 1 : 0);
prop.put("content_showTags", sb.getConfigBool("search.result.show.tags", false) ? 1 : 0);
Expand Down

0 comments on commit 200769d

Please sign in to comment.