From db2008f8814062f6c2d246e32a03f41583c2ae64 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 18 Nov 2023 14:07:10 +0000 Subject: [PATCH] apsearch.php: Restore $uid Also swap `FALSE` for `false` Follows up 6dec7d05da1a9ea18777275b349623482ef6fabc --- php/apsearch.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/php/apsearch.php b/php/apsearch.php index b7290176..ce123030 100644 --- a/php/apsearch.php +++ b/php/apsearch.php @@ -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."]