From 66c29a66638066c3c56cdcbd423d5c7874b73a27 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 11 Apr 2011 09:59:56 -0400 Subject: [PATCH] Enforce default paging value. --- gitblit.properties | 1 + src/com/gitblit/wicket/panels/LogPanel.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/gitblit.properties b/gitblit.properties index 9174b335..8ea1cc66 100644 --- a/gitblit.properties +++ b/gitblit.properties @@ -78,6 +78,7 @@ summaryCommitCount = 20 summaryRefsCount = 5 # The number of commits to show on each page of a Log +# Value must exceed 0 else default of 50 is used logPageCommitsCount = 50 # Registered extensions for google-code-prettify diff --git a/src/com/gitblit/wicket/panels/LogPanel.java b/src/com/gitblit/wicket/panels/LogPanel.java index 8a22de1e..17b01db4 100644 --- a/src/com/gitblit/wicket/panels/LogPanel.java +++ b/src/com/gitblit/wicket/panels/LogPanel.java @@ -34,6 +34,10 @@ public class LogPanel extends Panel { super(wicketId); boolean pageResults = limit <= 0; int itemsPerPage = StoredSettings.getInteger("logPageCommitsCount", 50); + if (itemsPerPage <= 1) { + itemsPerPage = 50; + } + final Map> allRefs = JGitUtils.getAllRefs(r); List commits; if (pageResults) { -- 2.39.5