Fix bugs due to recent code standards enforcement
Fix bugs due to recent code standards enforcement

--- a/include/common-geo.inc.php
+++ b/include/common-geo.inc.php
@@ -27,13 +27,13 @@
     if (sizeof($mapPoints) < 1)
         return 'map error';
     if (sizeof($mapPoints) === 1) {
-        $markers = 'markers={$mapPoints[0][0]},{$mapPoints[0][1]}';
+        $markers = 'markers='.$mapPoints[0][0].','.$mapPoints[0][1];
     } else {
         if (!$numbered) {
             $markers = 'markers=';
         }
         if ($path) {
-            $markers.= 'markers={$mapPoints[0][0]},{$mapPoints[0][1]}&amp;path=';
+            $markers.= 'markers='.$mapPoints[0][0].','.$mapPoints[0][1].'&amp;path=';
         }
         foreach ($mapPoints as $index => $mapPoint) {
             if ($twotone && $index == 0) {

--- a/include/db/route-dao.inc.php
+++ b/include/db/route-dao.inc.php
@@ -292,7 +292,7 @@
 WHERE (service_id=:service_periodA OR service_id=:service_periodB)
 AND ST_DWithin(position, ST_GeographyFromText(\'SRID=4326;POINT($lng $lat)\'), :distance, FALSE)
         group by service_id,trips.route_id,trips.direction_id,route_short_name,route_long_name
-        order by distance $limitSQL';
+        order by distance '.$limitSQL;
     debug($query, 'database');
     $query = $conn->prepare($query);
     $query->bindParam(':service_periodA', $sidA);

--- a/include/db/stop-dao.inc.php
+++ b/include/db/stop-dao.inc.php
@@ -69,9 +69,9 @@
     if ($limit != '')
         $limitSQL = ' LIMIT :limit ';
     global $conn;
-    $query = 'Select *, ST_Distance(position, ST_GeographyFromText(\'SRID=4326;POINT($lng $lat)\'), FALSE) as distance
-        from stops WHERE ST_DWithin(position, ST_GeographyFromText(\'SRID=4326;POINT($lng $lat)\'), :distance, FALSE)
-        order by distance $limitSQL;';
+    $query = 'Select *, ST_Distance(position, ST_GeographyFromText(\'SRID=4326;POINT('.$lng.' '.$lat.')\'), FALSE) as distance
+        from stops WHERE ST_DWithin(position, ST_GeographyFromText(\'SRID=4326;POINT('.$lng.' '.$lat.')\'), :distance, FALSE)
+        order by distance '.$limitSQL;
     debug($query, 'database');
     $query = $conn->prepare($query);
     $query->bindParam(':distance', $distance);
@@ -186,7 +186,7 @@
 AND stop_times.trip_id = end_times.trip_id
 AND (service_id=:service_periodA OR service_id=:service_periodB) ' . ($route_short_name != '' ? ' AND route_short_name = :route_short_name ' : '') . ' 
 AND end_times.arrival_time > :afterTime
-ORDER BY end_time $limitSQL';
+ORDER BY end_time '.$limitSQL;
     } else {
         $query = 'SELECT stop_times.trip_id,arrival_time,stop_times.stop_id,stop_sequence,service_id,trips.route_id,route_short_name,route_long_name
 FROM stop_times
@@ -195,7 +195,7 @@
 join routes on trips.route_id = routes.route_id
 WHERE stop_times.stop_id = :stopID
 AND (service_id=:service_periodA OR service_id=:service_periodB) ' . ($route_short_name != '' ? ' AND route_short_name = :route_short_name ' : '') . ' 
-ORDER BY arrival_time $limitSQL';
+ORDER BY arrival_time '.$limitSQL;
     }
     debug($query, 'database');
     $query = $conn->prepare($query);