From 1e9ddaf8ea3acb07f07151e26508f7f3a165db4e Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 29 Mar 2013 09:39:23 -0400
Subject: [PATCH] Clarify need to review installService.cmd for keystore password (issue 221)

---
 src/main/java/com/gitblit/GitBlit.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java
index 2361a6e..7c6a535 100644
--- a/src/main/java/com/gitblit/GitBlit.java
+++ b/src/main/java/com/gitblit/GitBlit.java
@@ -2903,6 +2903,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 +2938,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 +3236,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