summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-12-28 16:58:42 -0500
committerJames Moger <james.moger@gitblit.com>2011-12-28 16:58:42 -0500
commit7f14da3aceae2db516a7bec2c2e00d48049ec7b5 (patch)
tree894a59738df42713581ebbdb5b7cd836e9e7c257
parente9e175f25e2f66961cd0885cdbfd0f4bad4c1ab2 (diff)
downloadgitblit-7f14da3aceae2db516a7bec2c2e00d48049ec7b5.tar.gz
gitblit-7f14da3aceae2db516a7bec2c2e00d48049ec7b5.zip
Strip named repository parameter from root page parameters
-rw-r--r--src/com/gitblit/wicket/pages/RootPage.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/com/gitblit/wicket/pages/RootPage.java b/src/com/gitblit/wicket/pages/RootPage.java
index 4021e5c0..f8fd8a8c 100644
--- a/src/com/gitblit/wicket/pages/RootPage.java
+++ b/src/com/gitblit/wicket/pages/RootPage.java
@@ -94,8 +94,8 @@ public abstract class RootPage extends BasePage {
// navigation links
List<PageRegistration> pages = new ArrayList<PageRegistration>();
- pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class, getPageParameters()));
- pages.add(new PageRegistration("gb.activity", ActivityPage.class, getPageParameters()));
+ pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class, getRootPageParameters()));
+ pages.add(new PageRegistration("gb.activity", ActivityPage.class, getRootPageParameters()));
if (showAdmin) {
pages.add(new PageRegistration("gb.users", UsersPage.class));
}
@@ -163,6 +163,15 @@ public abstract class RootPage extends BasePage {
super.setupPage(repositoryName, pageName);
}
+
+ private PageParameters getRootPageParameters() {
+ PageParameters params = getPageParameters();
+ if (params != null) {
+ // remove named repository parameter
+ params.remove("r");
+ }
+ return params;
+ }
private void loginUser(UserModel user) {
if (user != null) {