Make sure urls encode spaces, disable google analytics on localhost
[busui.git] / include / common-template.inc.php
blob:a/include/common-template.inc.php -> blob:b/include/common-template.inc.php
--- a/include/common-template.inc.php
+++ b/include/common-template.inc.php
@@ -129,7 +129,7 @@
 
 </script> ";
 	}
-	echo '
+	if (!isDebugServer()) echo '
 <script type="text/javascript">'."
 
   var _gaq = _gaq || [];
@@ -145,7 +145,8 @@
 s.parentNode.insertBefore(ga, s);
   })();
 
-</script></head>".'
+</script>";
+echo '</head>
 <body>
     <div id="skip">
     <a href="#maincontent">Skip to content</a>
@@ -176,7 +177,7 @@
 	}
 	echo '<div id="footer"><a href="about.php">About/Contact Us</a>&nbsp;<a href="feedback.php">Feedback/Bug Report</a></a>';
 	echo '</div>';
-        if (!isDebug()) {
+        if (!isDebugServer()) {
          $googleAnalyticsImageUrl = googleAnalyticsGetImageUrl();
   echo '<img src="' . $googleAnalyticsImageUrl . '" />';
     }