diff options
author | Andrew Dolgov <[email protected]> | 2021-02-23 09:01:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-23 09:01:27 +0300 |
commit | 2ae0b7059f2ed56b92a8f396c63224b36f71df09 (patch) | |
tree | 3aa1f8e8b0980c12f2b9d2b37a73034b9108acd8 /api/index.php | |
parent | 5229cc58b269bd04b2be7768107697063d95736e (diff) |
cleanup some defined-stuff
Diffstat (limited to 'api/index.php')
-rw-r--r-- | api/index.php | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/api/index.php b/api/index.php index d1e02bbd4..4e2c06b9d 100644 --- a/api/index.php +++ b/api/index.php @@ -8,7 +8,6 @@ chdir(".."); - define('TTRSS_SESSION_NAME', 'ttrss_api_sid'); define('NO_SESSION_AUTOSTART', true); require_once "autoload.php"; @@ -20,26 +19,11 @@ ob_start(); - $input = file_get_contents("php://input"); - - if (defined('_API_DEBUG_HTTP_ENABLED') && _API_DEBUG_HTTP_ENABLED) { - // Override $_REQUEST with JSON-encoded data if available - // fallback on HTTP parameters - if ($input) { - $input = json_decode($input, true); - if ($input) $_REQUEST = $input; - } - } else { - // Accept JSON only - $input = json_decode((string)$input, true); - $_REQUEST = $input; - } + $_REQUEST = json_decode((string)file_get_contents("php://input"), true); if (!empty($_REQUEST["sid"])) { session_id($_REQUEST["sid"]); @session_start(); - } else if (defined('_API_DEBUG_HTTP_ENABLED')) { - @session_start(); } startup_gettext(); |