Adapted getRoutesByStop().
This commit is contained in:
parent
b9ed5b7bf5
commit
4ffef02bb9
1 changed files with 5 additions and 5 deletions
|
@ -21,17 +21,17 @@ function getRoutesOfLine($line){
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRoutesByStop($stopId){
|
function getRoutesByStop($stopId,$direction){
|
||||||
global $routes;
|
global $routes;
|
||||||
$tmp = array();
|
$res = array();
|
||||||
foreach ($routes as $route){
|
foreach ($routes as $route){
|
||||||
foreach ($route['stops'] as $stop){
|
foreach ($route['stops'][$direction] as $stop){
|
||||||
if ($stop == $stopId){
|
if ($stop == $stopId){
|
||||||
array_push($tmp, $route);
|
array_push($res, $route["id"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $tmp;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isValidRoute($id){
|
function isValidRoute($id){
|
||||||
|
|
Reference in a new issue