]> source.dussan.org Git - gitblit.git/commitdiff
Enforce default paging value.
authorJames Moger <james.moger@gitblit.com>
Mon, 11 Apr 2011 13:59:56 +0000 (09:59 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 11 Apr 2011 13:59:56 +0000 (09:59 -0400)
gitblit.properties
src/com/gitblit/wicket/panels/LogPanel.java

index 9174b335b5a9524145b595b978991b7bd833cd4a..8ea1cc66ee384602d03c85ef7bd5bf8890ea5de8 100644 (file)
@@ -78,6 +78,7 @@ summaryCommitCount = 20
 summaryRefsCount = 5\r
 \r
 # The number of commits to show on each page of a Log\r
+# Value must exceed 0 else default of 50 is used\r
 logPageCommitsCount = 50\r
 \r
 # Registered extensions for google-code-prettify\r
index 8a22de1e18a6f57da2dab82f1010bad5dcd715f4..17b01db4281efd143bbf2a158ebe7e1d1bac0a6d 100644 (file)
@@ -34,6 +34,10 @@ public class LogPanel extends Panel {
                super(wicketId);\r
                boolean pageResults = limit <= 0;\r
                int itemsPerPage = StoredSettings.getInteger("logPageCommitsCount", 50);\r
+               if (itemsPerPage <= 1) {\r
+                       itemsPerPage = 50;\r
+               }\r
+               \r
                final Map<ObjectId, List<String>> allRefs = JGitUtils.getAllRefs(r);\r
                List<RevCommit> commits;\r
                if (pageResults) {\r