]> source.dussan.org Git - gitblit.git/commitdiff
Strip named repository parameter from root page parameters
authorJames Moger <james.moger@gitblit.com>
Wed, 28 Dec 2011 21:58:42 +0000 (16:58 -0500)
committerJames Moger <james.moger@gitblit.com>
Wed, 28 Dec 2011 21:58:42 +0000 (16:58 -0500)
src/com/gitblit/wicket/pages/RootPage.java

index 4021e5c06ca40b52657ecca9c4aafd2001c5a6b6..f8fd8a8cf6a3519cc342e1f24dd63c23b4dd6d5b 100644 (file)
@@ -94,8 +94,8 @@ public abstract class RootPage extends BasePage {
 \r
                // navigation links\r
                List<PageRegistration> pages = new ArrayList<PageRegistration>();\r
-               pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class, getPageParameters()));\r
-               pages.add(new PageRegistration("gb.activity", ActivityPage.class, getPageParameters()));\r
+               pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class, getRootPageParameters()));\r
+               pages.add(new PageRegistration("gb.activity", ActivityPage.class, getRootPageParameters()));\r
                if (showAdmin) {\r
                        pages.add(new PageRegistration("gb.users", UsersPage.class));\r
                }\r
@@ -163,6 +163,15 @@ public abstract class RootPage extends BasePage {
 \r
                super.setupPage(repositoryName, pageName);\r
        }\r
+       \r
+       private PageParameters getRootPageParameters() {\r
+               PageParameters params = getPageParameters();\r
+               if (params != null) {\r
+                       // remove named repository parameter\r
+                       params.remove("r");\r
+               }\r
+               return params;\r
+       }\r
 \r
        private void loginUser(UserModel user) {\r
                if (user != null) {\r