From 2edfcbbd85ab4109cd7d80766577584af973c9e9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 8 Dec 2020 13:54:45 +0300 Subject: [PATCH] get_article_image: add support for ARTICLE_KIND_ALBUM --- classes/article.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/article.php b/classes/article.php index 5b699a103..b600adff2 100755 --- a/classes/article.php +++ b/classes/article.php @@ -770,9 +770,13 @@ class Article extends Handler_Protected { } } - if ($article_image) + if ($article_image) { $article_image = rewrite_relative_url($site_url, $article_image); + if (!$article_kind && (count($enclosures) > 1 || $elems->length > 1)) + $article_kind = ARTICLE_KIND_ALBUM; + } + if ($article_stream) $article_stream = rewrite_relative_url($site_url, $article_stream); }