Licence and jqmobile beta 3 upgrade
[busui.git] / trip.php
blob:a/trip.php -> blob:b/trip.php
--- a/trip.php
+++ b/trip.php
@@ -66,13 +66,12 @@
 echo "</div>";
 echo '  <ul data-role="listview"  data-inset="true">';
 $stopsGrouped = Array();
-$tripStopTimes = getTimeInterpolatedTrip($tripid);
+$tripStopTimes = getTripStopTimes($tripid);
 echo '<li data-role="list-divider">' . $tripStopTimes[0]['arrival_time'] . ' to ' . $tripStopTimes[sizeof($tripStopTimes) - 1]['arrival_time'] . ' ' . $trip['route_long_name'] . ' (' . ucwords($tripStopTimes[0]['service_id']) . ')</li>';
 foreach ($tripStopTimes as $key => $tripStopTime) {
-    if (($tripStopTimes[$key]["stop_name"] != $tripStopTimes[$key + 1]["stop_name"]) || $key + 1 >= sizeof($tripStopTimes)) {
+    if ($key + 1 > sizeof($tripStopTimes) || ($tripStopTimes[$key]["stop_name"] != $tripStopTimes[$key + 1]["stop_name"])) {
         echo '<li>';
-        if (!startsWith($tripStopTime['stop_code'], "Wj"))
-            echo '<img src="css/images/time.png" alt="Timing Point" class="ui-li-icon">';
+       
         if (sizeof($stopsGrouped) > 0) {
             // print and empty grouped stops
             // subsequent duplicates
@@ -84,7 +83,7 @@
                 echo '<br>' . distance($tripStopTime['stop_lat'], $tripStopTime['stop_lon'], $_SESSION['lat'], $_SESSION['lon'], true) . 'm away';
             }
             echo '</p>';
-            echo bracketsMeanNewLine($tripStopTime["stop_name"]);
+            echo $tripStopTime["stop_name"];
             echo '</a></li>';
             flush();
             @ob_flush();
@@ -97,7 +96,7 @@
                 echo '<br>' . distance($tripStopTime['stop_lat'], $tripStopTime['stop_lon'], $_SESSION['lat'], $_SESSION['lon'], true) . 'm away';
             }
             echo '</p>';
-            echo bracketsMeanNewLine($tripStopTime['stop_name']);
+            echo $tripStopTime['stop_name'];
             echo '</a></li>';
             flush();
             @ob_flush();