diff options
author | Andrew Dolgov <[email protected]> | 2020-12-07 12:09:06 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-12-07 12:09:06 +0300 |
commit | e40b79ab330b93ef14bb6a71e857673721579d68 (patch) | |
tree | 84db271873b17e51d7d0bda89de24011348793f0 /classes/api.php | |
parent | db3fcb861b8d8bfb793b6b1777e4e8c330ff00e4 (diff) |
get_article_image: return basic kind to which flavor image belongs
Diffstat (limited to 'classes/api.php')
-rwxr-xr-x | classes/api.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/api.php b/classes/api.php index 3bba4fa8d..6b857f689 100755 --- a/classes/api.php +++ b/classes/api.php @@ -786,11 +786,15 @@ class API extends Handler { $headline_row["content"] = DiskCache::rewriteUrls($headline_row['content']); - list ($flavor_image, $flavor_stream) = Article::get_article_image($enclosures, $line["content"], $line["site_url"]); + list ($flavor_image, $flavor_stream, $flavor_kind) = Article::get_article_image($enclosures, $line["content"], $line["site_url"]); $headline_row["flavor_image"] = $flavor_image; $headline_row["flavor_stream"] = $flavor_stream; + /* optional */ + if ($flavor_kind) + $headline_row["flavor_kind"] = $flavor_kind; + array_push($headlines, $headline_row); } } else if (is_numeric($result) && $result == -1) { |