fix bugs with empty tracking code

This commit is contained in:
Sebastian Sdorra
2011-11-13 18:10:20 +01:00
parent 124cae18d7
commit bd0b46f9e2
2 changed files with 11 additions and 5 deletions

View File

@@ -33,13 +33,16 @@
package sonia.scm.plugin.rest;
//~--- non-JDK imports --------------------------------------------------------
import sonia.scm.plugin.BackendConfiguration;
//~--- JDK imports ------------------------------------------------------------
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletContext;
import sonia.scm.plugin.BackendConfiguration;
/**
*
@@ -53,14 +56,14 @@ public class ViewableResource
*
*
* @param context
* @param configuration
*/
public ViewableResource(ServletContext context, BackendConfiguration configuration)
public ViewableResource(ServletContext context,
BackendConfiguration configuration)
{
this.contextPath = context.getContextPath();
this.configuration = configuration;
}
private BackendConfiguration configuration;
//~--- methods --------------------------------------------------------------
@@ -85,6 +88,9 @@ public class ViewableResource
//~--- fields ---------------------------------------------------------------
/** Field description */
private BackendConfiguration configuration;
/** Field description */
private String contextPath;
}

View File

@@ -48,7 +48,7 @@
<script src="${contextPath}template/js/html5.js"></script>
<![endif]-->
<base href="${contextPath}" />
<#if configuration.trackingConde??>
<#if configuration.trackingCode??>
<script type="text/javascript">
var _gaq = _gaq || [];