diff options
author | Andrew Dolgov <[email protected]> | 2021-03-15 22:29:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-15 22:29:03 +0300 |
commit | 77924a62860342bf548fa995cf10dd49db5513fc (patch) | |
tree | ad68651ed5bf32f0293e3ec5ac7494afb43abfdf /classes/api.php | |
parent | 1870fe172b41061899c1917303a494d5e567f1bf (diff) |
wip: flavor icon cachingexp-flavor-icon-cache
Diffstat (limited to 'classes/api.php')
-rwxr-xr-x | classes/api.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/api.php b/classes/api.php index 407afabad..128ed9cac 100755 --- a/classes/api.php +++ b/classes/api.php @@ -749,16 +749,16 @@ class API extends Handler { "tags" => $tags, ); - $enclosures = Article::_get_enclosures($line['id']); + if ($line["num_enclosures"] > 0 && $include_attachments) { + $enclosures = Article::_get_enclosures($line['id']); - if ($include_attachments) $headline_row['attachments'] = $enclosures; + } if ($show_excerpt) $headline_row["excerpt"] = $line["content_preview"]; if ($show_content) { - if ($sanitize_content) { $headline_row["content"] = Sanitizer::sanitize( $line["content"], @@ -790,7 +790,7 @@ class API extends Handler { if ($show_content) { $hook_object = ["headline" => &$headline_row]; - list ($flavor_image, $flavor_stream, $flavor_kind) = Article::_get_image($enclosures, + list ($flavor_image, $flavor_stream, $flavor_kind) = Article::_get_image($line["id"], $enclosures ?? [], $line["content"], // unsanitized $line["site_url"] ?? "", // could be null if archived article $headline_row); |