diff options
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java index b2fd9037..1d81061e 100644 --- a/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java +++ b/src/main/java/com/gitblit/wicket/pages/LuceneSearchPage.java @@ -66,6 +66,8 @@ public class LuceneSearchPage extends RootPage { // default values
ArrayList<String> repositories = new ArrayList<String>();
String query = "";
+ boolean allRepos = false;
+
int page = 1;
int pageSize = app().settings().getInteger(Keys.web.itemsPerPage, 50);
@@ -91,8 +93,9 @@ public class LuceneSearchPage extends RootPage { List<String> list = StringUtils.getStringsFromValue(value);
repositories.addAll(list);
}
- - if (params.containsKey("allrepos")) {
+
+ allRepos = params.getAsBoolean("allrepos", false); + if (allRepos) {
repositories.addAll(availableRepositories);
}
@@ -133,7 +136,7 @@ public class LuceneSearchPage extends RootPage { // search form
final Model<String> queryModel = new Model<String>(query);
final Model<ArrayList<String>> repositoriesModel = new Model<ArrayList<String>>(searchRepositories);
- final Model<Boolean> allreposModel = new Model<Boolean>(params != null && params.containsKey("allrepos"));
+ final Model<Boolean> allreposModel = new Model<Boolean>(allRepos);
SessionlessForm<Void> form = new SessionlessForm<Void>("searchForm", getClass()) {
private static final long serialVersionUID = 1L;
|