--- a/include/common.inc.php +++ b/include/common.inc.php @@ -7,6 +7,8 @@ "phperror", "awsgtfs", "awsotp", + //"squallotp", + //"vanilleotp", "other" ); if (isDebug("awsgtfs")) { @@ -17,6 +19,12 @@ $otpAPIurl = 'http://localhost:8080/opentripplanner-api-webapp/'; if (isDebug("awsotp") || php_uname('n') == "maxious.xen.prgmr.com") { $otpAPIurl = 'http://bus-main.lambdacomplex.org:8080/opentripplanner-api-webapp/'; +} +if (isDebug("squallotp")) { + $otpAPIurl = 'http://10.0.1.108:5080/opentripplanner-api-webapp/'; +} +if (isDebug("vanilleotp")) { + $otpAPIurl = 'http://10.0.1.135:8080/opentripplanner-api-webapp/'; } if (isDebug("phperror")) error_reporting(E_ALL ^ E_NOTICE); include_once ("common-geo.inc.php"); @@ -59,11 +67,18 @@ } } } + if ($_SESSION['lat'] != "" && isAnalyticsOn()) { + trackEvent("Geolocation","Updated Location", "Geocoded - ".($geocoded ? "Yes" : "No")); + } } debug(print_r($_SESSION, true) , "session"); function isDebugServer() { return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME']; +} +function isAnalyticsOn() +{ + return !isDebugServer(); } function isDebug($debugReason = "other") {