From: Alexander Sadleir Date: Sat, 05 Nov 2011 01:52:38 +0000 Subject: Disable all database calls on feedback page X-Git-Url: https://maxious.lambdacomplex.org/git/?p=busui.git&a=commitdiff&h=91571b6f9dcb494d8f40afaf0c42499e25201c9f --- Disable all database calls on feedback page --- --- a/.box +++ /dev/null @@ -1,5 +1,1 @@ -shared_writable_dirs: - - /labs/tiles - - /lib/staticmaplite/cache -php_extensions: [pgsql, pdo, pdo_pgsql, curl] --- /dev/null +++ b/Boxfile @@ -1,1 +1,7 @@ +web1: + php_extensions: + - pgsql + - pdo + - pdo_pgsql + - curl --- a/about.php +++ b/about.php @@ -35,7 +35,8 @@ Some icons by Joseph Wain / glyphish.com
Native clients also available for iPhone(cbrTimetable by Sandor Kolotenko , ACT Buses by David Sullivan) - and Android (MyBus 2.0 by Imagine Team) + , Android (MyBus 2.0 by Imagine Team) + and Windows Phone 7 (TransHub Canberra by Soul Solutions)
GTFS-realtime API: Alerts and Trip Updates (but only Cancelled or Stop Skipped) --- a/feedback.php +++ b/feedback.php @@ -1,5 +1,6 @@ prepare($query); $query->bindParam(":routeID", $routeID); --- a/myway/myway_timeliness_reconcile.php +++ b/myway/myway_timeliness_reconcile.php @@ -19,12 +19,16 @@ foreach ($_REQUEST as $key => $value) { if (strstr($key, "route") && !strstr($value, "Select")) { $myway_route = str_replace("route", "", $key); - $route_id = $value; - $query = "update myway_routes set route_id = :route_id where myway_route = :myway_route"; + $vparts = explode("-",$value); + $route_short_name = $vparts[0]; + $trip_headsign = $vparts[1]; + $query = "update myway_routes set route_short_name = :route_short_name, trip_headsign = :trip_headsign where myway_route = :myway_route"; debug($query, "database"); $query = $conn->prepare($query); $query->bindParam(":myway_route", $myway_route, PDO::PARAM_STR, 5); - $query->bindParam(":route_id", $route_id, PDO::PARAM_STR, 42); + + $query->bindParam(":route_short_name", $route_short_name, PDO::PARAM_STR, 42); + $query->bindParam(":trip_headsign", $trip_headsign, PDO::PARAM_STR, 42); $query->execute(); die(print_r($conn->errorInfo(), true)); } @@ -132,8 +136,8 @@ '; foreach (getRoutesByShortName($searchRouteNo) as $routeResult) { foreach(getRouteHeadsigns($routeResult['route_id']) as $headsign ) { - echo "\n"; + echo "\n"; } }