Assume first match in validate() for request station names
This commit is contained in:
parent
30971e3ade
commit
588fad19d1
1 changed files with 2 additions and 2 deletions
|
@ -57,8 +57,8 @@ if ($type == "validate") {
|
||||||
} else if ($type == "conn" || $type == "connection" || $type == "connections") {
|
} else if ($type == "conn" || $type == "connection" || $type == "connections") {
|
||||||
if ((isset($_GET["from"]) && isset($_GET["to"])) || (isset($_POST["from"]) && isset($_POST["to"]))) {
|
if ((isset($_GET["from"]) && isset($_GET["to"])) || (isset($_POST["from"]) && isset($_POST["to"]))) {
|
||||||
prepare();
|
prepare();
|
||||||
$from = (isset($_GET["from"]) && isset($_GET["to"]) ? $_GET["from"] : $_POST["from"]);
|
$from = (isset($_GET["from"]) && isset($_GET["to"]) ? $api->validate($_GET["from"])[0]["id"] : $api->validate($_POST["from"])[0]["id"]);
|
||||||
$to = (isset($_GET["from"]) && isset($_GET["to"]) ? $_GET["to"] : $_POST["to"]);
|
$to = (isset($_GET["from"]) && isset($_GET["to"]) ? $api->validate($_GET["to"])[0]["id"] : $api->validate($_POST["to"])[0]["id"]);
|
||||||
$count = (isset($_GET["count"]) ? $_GET["count"] : (isset($_POST["count"]) ? $_POST["count"] : 3));
|
$count = (isset($_GET["count"]) ? $_GET["count"] : (isset($_POST["count"]) ? $_POST["count"] : 3));
|
||||||
$date = (isset($_GET["date"]) ? $_GET["date"] : (isset($_POST["date"]) ? $_POST["date"] : null));
|
$date = (isset($_GET["date"]) ? $_GET["date"] : (isset($_POST["date"]) ? $_POST["date"] : null));
|
||||||
$time = (isset($_GET["time"]) ? $_GET["time"] : (isset($_POST["time"]) ? $_POST["time"] : null));
|
$time = (isset($_GET["time"]) ? $_GET["time"] : (isset($_POST["time"]) ? $_POST["time"] : null));
|
||||||
|
|
Loading…
Reference in a new issue