diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-11-25 19:47:28 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-11-25 19:47:28 +0300 |
| commit | aaeabbc96188dbe19aee5a95f862b02d9df64dc1 (patch) | |
| tree | b11a3011fac3ee8b19017e0e4b73a31bf1719a11 | |
| parent | 103bafd90a33abc1478e7c4ec6b732ebd04a4995 (diff) | |
API: allow catchup for search results (bumps api level to 22)
| -rw-r--r-- | classes/API.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/API.php b/classes/API.php index e808376ed..31a3bec97 100644 --- a/classes/API.php +++ b/classes/API.php @@ -1,7 +1,7 @@ <?php class API extends Handler { - const API_LEVEL = 21; + const API_LEVEL = 22; const STATUS_OK = 0; const STATUS_ERR = 1; @@ -405,11 +405,13 @@ class API extends Handler { $feed_id = clean($_REQUEST["feed_id"]); $is_cat = self::_param_to_bool($_REQUEST["is_cat"] ?? false); $mode = clean($_REQUEST["mode"] ?? ""); + $search_query = clean($_REQUEST["search_query"] ?? ""); + $search_lang = clean($_REQUEST["search_lang"] ?? ""); if (!in_array($mode, ["all", "1day", "1week", "2week"])) $mode = "all"; - Feeds::_catchup($feed_id, $is_cat, $_SESSION["uid"], $mode); + Feeds::_catchup($feed_id, $is_cat, $_SESSION["uid"], $mode, [$search_query, $search_lang]); return $this->_wrap(self::STATUS_OK, array("status" => "OK")); } |