From c5d052400cd60e5b58ba7b5e1fd7706ee0676ab7 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 29 Mar 2013 11:16:45 -0400
Subject: [PATCH] Updated documentation
---
src/main/java/com/gitblit/GitBlit.java | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 0452e1d..65dc559 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -613,7 +613,7 @@
X509Metadata metadata = HttpUtils.getCertificateMetadata(httpRequest);
if (user != null) {
flagWicketSession(AuthenticationType.CERTIFICATE);
- logger.info(MessageFormat.format("{0} authenticated by client certificate {1} from {2}",
+ logger.debug(MessageFormat.format("{0} authenticated by client certificate {1} from {2}",
user.username, metadata.serialNumber, httpRequest.getRemoteAddr()));
return user;
} else {
@@ -633,7 +633,7 @@
UserModel user = getUserModel(principal.getName());
if (user != null) {
flagWicketSession(AuthenticationType.CONTAINER);
- logger.info(MessageFormat.format("{0} authenticated by servlet container principal from {1}",
+ logger.debug(MessageFormat.format("{0} authenticated by servlet container principal from {1}",
user.username, httpRequest.getRemoteAddr()));
return user;
} else {
@@ -647,7 +647,7 @@
UserModel user = authenticate(httpRequest.getCookies());
if (user != null) {
flagWicketSession(AuthenticationType.COOKIE);
- logger.info(MessageFormat.format("{0} authenticated by cookie from {1}",
+ logger.debug(MessageFormat.format("{0} authenticated by cookie from {1}",
user.username, httpRequest.getRemoteAddr()));
return user;
}
@@ -669,7 +669,7 @@
UserModel user = authenticate(username, password);
if (user != null) {
flagWicketSession(AuthenticationType.CREDENTIALS);
- logger.info(MessageFormat.format("{0} authenticated by BASIC request header from {1}",
+ logger.debug(MessageFormat.format("{0} authenticated by BASIC request header from {1}",
user.username, httpRequest.getRemoteAddr()));
return user;
} else {
@@ -1655,6 +1655,11 @@
model.name = com.gitblit.utils.FileUtils.getRelativePath(basePath, r.getDirectory());
} else {
model.name = com.gitblit.utils.FileUtils.getRelativePath(basePath, r.getDirectory().getParentFile());
+ }
+ if (StringUtils.isEmpty(model.name)) {
+ // Repository is NOT located relative to the base folder because it
+ // is symlinked. Use the provided repository name.
+ model.name = repositoryName;
}
model.hasCommits = JGitUtils.hasCommits(r);
model.lastChange = JGitUtils.getLastChange(r);
@@ -2903,6 +2908,10 @@
* @param toAddresses
*/
public void sendMail(String subject, String message, String... toAddresses) {
+ if (toAddresses == null || toAddresses.length == 0) {
+ logger.debug(MessageFormat.format("Dropping message {0} because there are no recipients", subject));
+ return;
+ }
try {
Message mail = mailExecutor.createMessage(toAddresses);
if (mail != null) {
@@ -2934,6 +2943,10 @@
* @param toAddresses
*/
public void sendHtmlMail(String subject, String message, String... toAddresses) {
+ if (toAddresses == null || toAddresses.length == 0) {
+ logger.debug(MessageFormat.format("Dropping message {0} because there are no recipients", subject));
+ return;
+ }
try {
Message mail = mailExecutor.createMessage(toAddresses);
if (mail != null) {
@@ -3228,13 +3241,15 @@
if (!StringUtils.isEmpty(openShift)) {
// Gitblit is running in OpenShift/JBoss
File base = new File(openShift);
+ logger.info("EXPRESS contextFolder is " + contextFolder.getAbsolutePath());
// gitblit.properties setting overrides
File overrideFile = new File(base, "gitblit.properties");
webxmlSettings.applyOverrides(overrideFile);
// Copy the included scripts to the configured groovy folder
- File localScripts = new File(base, webxmlSettings.getString(Keys.groovy.scriptsFolder, "groovy"));
+ String path = webxmlSettings.getString(Keys.groovy.scriptsFolder, "groovy");
+ File localScripts = com.gitblit.utils.FileUtils.resolveParameter(Constants.baseFolder$, base, path);
if (!localScripts.exists()) {
File warScripts = new File(contextFolder, "/WEB-INF/data/groovy");
if (!warScripts.equals(localScripts)) {
--
Gitblit v1.9.1