From bb20691d4f9d86fb5b3858d964a321de2a68cf16 Mon Sep 17 00:00:00 2001 From: reger Date: Sat, 1 Dec 2012 01:14:29 +0100 Subject: [PATCH] fix: respect config setting of "show Nav Top-Menu" in HostBrowser.html for public users (as hostbrowser is now available in search results) --- htroot/HostBrowser.html | 10 ++++++++++ htroot/HostBrowser.java | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/htroot/HostBrowser.html b/htroot/HostBrowser.html index bbd098d4c..54e5ea915 100644 --- a/htroot/HostBrowser.html +++ b/htroot/HostBrowser.html @@ -58,7 +58,17 @@ function updatepage(str) { + #(topmenu)# + #%env/templates/portalheader.template%# + + #%env/templates/embeddedheader.template%# + :: #%env/templates/simpleheader.template%# + #(/topmenu)#

Host Browser

Browse the index of #[ucount]# documents. Enter a host or an URL for a file list or view a list of all hosts, only hosts with urls pending in the crawler or only with load errors.

diff --git a/htroot/HostBrowser.java b/htroot/HostBrowser.java index 985039909..fba5ae3cc 100644 --- a/htroot/HostBrowser.java +++ b/htroot/HostBrowser.java @@ -81,6 +81,12 @@ public class HostBrowser { prop.put("files", 0); prop.put("admin", 0); + if (admin) { // show top nav to admins + prop.put("topmenu",1); + } else { // for other respect setting in Search Design Configuration + prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0); + } + if (!searchAllowed) { prop.put("result", "You are not allowed to use this page. Please ask an administrator for permission."); return prop;