diff options
author | lolcat <will@lolcat.ca> | 2023-11-07 08:04:56 -0500 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-11-07 08:04:56 -0500 |
commit | 785452873f0ee0a27fc157b482b7551560f0282d (patch) | |
tree | 4c70e240031ed3868425ca683c83ebfd378a9159 /api/v1/web.php | |
parent | 64b090ee058953aed2246967332c7f0b6623cd8f (diff) |
fix typo
Diffstat (limited to 'api/v1/web.php')
-rw-r--r-- | api/v1/web.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/api/v1/web.php b/api/v1/web.php index 61bf82a..dc1a7cc 100644 --- a/api/v1/web.php +++ b/api/v1/web.php @@ -1,8 +1,14 @@ <?php +chdir("../../"); header("Content-Type: application/json"); -chdir("../../"); +include "data/config.php"; +if(config::API_ENABLED === false){ + + echo json_encode(["status" => "The server administrator disabled the API!"]); + return; +} include "lib/frontend.php"; $frontend = new frontend(); @@ -21,7 +27,13 @@ new captcha($null, $null, $null, "web", false); $get = $frontend->parsegetfilters($_GET, $filters); -if(!isset($_GET["extendedsearch"])){ +if( + isset($_GET["extendedsearch"]) && + $_GET["extendedsearch"] == "yes" +){ + + $get["extendedsearch"] = "yes"; +}else{ $get["extendedsearch"] = "no"; } |