summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/gitblit')
-rw-r--r--src/com/gitblit/wicket/pages/LuceneSearchPage.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/gitblit/wicket/pages/LuceneSearchPage.java b/src/com/gitblit/wicket/pages/LuceneSearchPage.java
index 8e09a340..69fb9203 100644
--- a/src/com/gitblit/wicket/pages/LuceneSearchPage.java
+++ b/src/com/gitblit/wicket/pages/LuceneSearchPage.java
@@ -156,8 +156,13 @@ public class LuceneSearchPage extends RootPage {
// results header
if (results.size() == 0) {
- add(new Label("resultsHeader").setVisible(false));
- add(new Label("resultsCount").setVisible(false));
+ if (!ArrayUtils.isEmpty(searchRepositories) && !StringUtils.isEmpty(query)) {
+ add(new Label("resultsHeader", query).setRenderBodyOnly(true));
+ add(new Label("resultsCount", "0 hits").setRenderBodyOnly(true));
+ } else {
+ add(new Label("resultsHeader").setVisible(false));
+ add(new Label("resultsCount").setVisible(false));
+ }
} else {
add(new Label("resultsHeader", query).setRenderBodyOnly(true));
add(new Label("resultsCount", MessageFormat.format("results {0} - {1} ({2} hits)",