Skip to content

Commit

Permalink
apsearch.php: Restore $uid
Browse files Browse the repository at this point in the history
Also swap `FALSE` for `false`

Follows up 6dec7d0
  • Loading branch information
reedy authored Nov 18, 2023
1 parent 4b3fb11 commit db2008f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion php/apsearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
$offset = intval($_POST["offset"]);
$action = $_POST["action"];
$apid = $_POST["apid"];
$uid = $_SESSION["uid"] ?? null;

// https://github.com/jpatokal/openflights/issues/1447
$ref = $_SERVER['HTTP_REFERER'];
if (strpos($ref, 'com.cathaypacific.iJourneyLite') !== FALSE) {
if (strpos($ref, 'com.cathaypacific.iJourneyLite') !== false) {
die(
json_encode(
["status" => 0, "message" => "Cathay Pacific iJourneyLite is not licensed to use this API. Please contact info@openflights.org to resolve this."]
Expand Down

0 comments on commit db2008f

Please sign in to comment.