Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix servicealert editor due to "end" field

  • Loading branch information...
commit d86046138da234caf6ebf433246ae671f31541e1 1 parent 61f8205
@maxious authored
Showing with 5 additions and 5 deletions.
  1. +4 −4 include/db/servicealert-dao.inc.php
  2. +1 −1  rtpis/siri.php
View
8 include/db/servicealert-dao.inc.php
@@ -33,7 +33,7 @@ function getServiceOverride($date = '') {
function getServiceAlert($alertID) {
global $conn;
- $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as \\\'end\\\',cause,effect,header,description,url from servicealerts_alerts where id = :servicealert_id';
+ $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as end,cause,effect,header,description,url from servicealerts_alerts where id = :servicealert_id';
debug($query, 'database');
$query = $conn->prepare($query);
$query->bindParam(':servicealert_id', $alertID);
@@ -93,7 +93,7 @@ function addServiceAlert($alert) {
function getCurrentAlerts() {
global $conn;
- $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as "end",cause,effect,header,description,url from servicealerts_alerts where NOW() > start and NOW() < "end"';
+ $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as end,cause,effect,header,description,url from servicealerts_alerts where NOW() > start and NOW() < "end"';
// debug($query, 'database');
$query = $conn->prepare($query);
$query->execute();
@@ -106,7 +106,7 @@ function getCurrentAlerts() {
function getFutureAlerts() {
global $conn;
- $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as "end",cause,effect,header,description,url from servicealerts_alerts where NOW() < "end"';
+ $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as end,cause,effect,header,description,url from servicealerts_alerts where NOW() < "end"';
// debug($query, 'database');
$query = $conn->prepare($query);
$query->execute();
@@ -119,7 +119,7 @@ function getFutureAlerts() {
function getAllAlerts() {
global $conn;
- $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as "end",cause,effect,header,description,url from servicealerts_alerts';
+ $query = 'SELECT id,extract(\'epoch\' from start) as start, extract(\'epoch\' from "end") as end,cause,effect,header,description,url from servicealerts_alerts';
// debug($query, 'database');
$query = $conn->prepare($query);
$query->execute();
View
2  rtpis/siri.php
@@ -37,7 +37,7 @@ function accept_header($header = false) {
return $toret;
}
function usage() {
-echo "Usage notes: Must specify format json/xml. If callback is specified, will provide jsonp. Can filter with parmaters filter_class route/stop and filter_id with the id specified in GTFS."
+echo "Usage notes: Must specify format json/xml. If callback is specified, will provide jsonp. Can filter with parmaters filter_class route/stop and filter_id with the id specified in GTFS.";
die();
}
$json_types = Array("application/json","application/x-javascript","text/javascript","text/x-javascript","text/x-json");
Please sign in to comment.
Something went wrong with that request. Please try again.