From 46bdf9829d62a296c66c8a15969308838ea8cbe9 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 02 Jan 2013 16:19:06 -0500
Subject: [PATCH] Fixed NPE with web.allowForking && !git.cacheRepositoryList (issue-182)
---
src/com/gitblit/authority/NewSSLCertificateDialog.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/com/gitblit/authority/NewSSLCertificateDialog.java b/src/com/gitblit/authority/NewSSLCertificateDialog.java
index 1ff542a..821e9e9 100644
--- a/src/com/gitblit/authority/NewSSLCertificateDialog.java
+++ b/src/com/gitblit/authority/NewSSLCertificateDialog.java
@@ -24,6 +24,7 @@
import java.util.Date;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
@@ -41,6 +42,7 @@
JDateChooser expirationDate;
JTextField hostname;
+ JCheckBox serveCertificate;
boolean isCanceled = true;
public NewSSLCertificateDialog(Frame owner, Date defaultExpiration) {
@@ -60,6 +62,7 @@
expirationDate = new JDateChooser(defaultExpiration);
hostname = new JTextField(20);
+ serveCertificate = new JCheckBox(Translation.get("gb.serveCertificate"), true);
JPanel panel = new JPanel(new GridLayout(0, 2, Utils.MARGIN, Utils.MARGIN));
@@ -68,6 +71,9 @@
panel.add(new JLabel(Translation.get("gb.expires")));
panel.add(expirationDate);
+
+ panel.add(new JLabel(""));
+ panel.add(serveCertificate);
JButton ok = new JButton(Translation.get("gb.ok"));
ok.addActionListener(new ActionListener() {
@@ -123,7 +129,11 @@
public Date getExpiration() {
return expirationDate.getDate();
}
-
+
+ public boolean isServeCertificate() {
+ return serveCertificate.isSelected();
+ }
+
public boolean isCanceled() {
return isCanceled;
}
--
Gitblit v1.9.1