From 916e848bd77cc0a63f083ff48e5a2e4e788e1f51 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Mon, 19 Dec 2011 09:11:52 -0500
Subject: [PATCH] Fixed commit url in sendemail.groovy

---
 groovy/sendemail.groovy |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/groovy/sendemail.groovy b/groovy/sendemail.groovy
index f90d7ff..6792d94 100644
--- a/groovy/sendemail.groovy
+++ b/groovy/sendemail.groovy
@@ -99,14 +99,15 @@
 }
 
 // define the summary and commit urls
+def repo =  + repository.name.replace('/', gitblit.getString(Keys.web.forwardSlashCharacter, '/'))
 def summaryUrl
 def commitUrl
-if (gitblit.getBoolean(Keys.web.mountParameters, true)) {
-	summaryUrl = url + '/summary/' + repository.name.replace('/', gitblit.getString(Keys.web.forwardSlashCharacter, '/'))
-	commitUrl = url + '/commit/'
+if (gitblit.getBoolean(Keys.web.mountParameters, true)) {	
+	summaryUrl = url + "/summary/$repo"
+	commitUrl = url + "/commit/$repo/"
 } else {
-	summaryUrl = url + '/summary?r=' + repository.name
-	commitUrl = url + '/commit?h='
+	summaryUrl = url + "/summary?r=$repo"
+	commitUrl = url + "/commit?r=$repo&h="
 }
 
 // construct a simple text summary of the changes contained in the push

--
Gitblit v1.9.1