From: James Moger Date: Wed, 28 Dec 2011 21:58:42 +0000 (-0500) Subject: Strip named repository parameter from root page parameters X-Git-Tag: v0.8.0~38 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f14da3aceae2db516a7bec2c2e00d48049ec7b5;p=gitblit.git Strip named repository parameter from root page parameters --- 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 pages = new ArrayList(); - 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) {