diff options
author | Andrew Dolgov <[email protected]> | 2021-02-12 14:08:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-12 14:08:34 +0300 |
commit | 699186f430bb28059d7ade7a15259f1ec10ff8f3 (patch) | |
tree | a2371492f533c6b7e9a5934b2cb53fd1937ca867 | |
parent | 0f7af07c6e00a976b1d15759e6d842791dc81821 (diff) | |
parent | a718b692a04767fb97dc7748fa476a2cfbbd1605 (diff) |
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
-rwxr-xr-x | classes/api.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/classes/api.php b/classes/api.php index fd783a63e..6a919be64 100755 --- a/classes/api.php +++ b/classes/api.php @@ -187,13 +187,13 @@ class API extends Handler { $offset = (int)clean($_REQUEST["skip"]); $filter = clean($_REQUEST["filter"] ?? ""); $is_cat = self::param_to_bool(clean($_REQUEST["is_cat"] ?? false)); - $show_excerpt = self::param_to_bool(clean($_REQUEST["show_excerpt"])); + $show_excerpt = self::param_to_bool(clean($_REQUEST["show_excerpt"] ?? false)); $show_content = self::param_to_bool(clean($_REQUEST["show_content"])); /* all_articles, unread, adaptive, marked, updated */ - $view_mode = clean($_REQUEST["view_mode"]); - $include_attachments = self::param_to_bool(clean($_REQUEST["include_attachments"])); + $view_mode = clean($_REQUEST["view_mode"] ?? null); + $include_attachments = self::param_to_bool(clean($_REQUEST["include_attachments"] ?? false)); $since_id = (int)clean($_REQUEST["since_id"] ?? 0); - $include_nested = self::param_to_bool(clean($_REQUEST["include_nested"])); + $include_nested = self::param_to_bool(clean($_REQUEST["include_nested"] ?? false)); $sanitize_content = !isset($_REQUEST["sanitize"]) || self::param_to_bool($_REQUEST["sanitize"]); $force_update = self::param_to_bool(clean($_REQUEST["force_update"] ?? false)); @@ -204,7 +204,7 @@ class API extends Handler { $_SESSION['hasSandbox'] = $has_sandbox; - list($override_order, $skip_first_id_check) = Feeds::order_to_override_query(clean($_REQUEST["order_by"])); + list($override_order, $skip_first_id_check) = Feeds::order_to_override_query(clean($_REQUEST["order_by"] ?? null)); /* do not rely on params below */ @@ -754,6 +754,8 @@ class API extends Handler { } else { $headline_row["content"] = $line["content"]; } + + $headline_row["content"] = DiskCache::rewriteUrls($headline_row['content']); } // unify label output to ease parsing @@ -782,8 +784,6 @@ class API extends Handler { }, $hook_object); - $headline_row["content"] = DiskCache::rewriteUrls($headline_row['content']); - list ($flavor_image, $flavor_stream, $flavor_kind) = Article::get_article_image($enclosures, $line["content"], $line["site_url"]); $headline_row["flavor_image"] = $flavor_image; |