1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 03:25:55 +00:00

Article::get_article_image() - also return stream URI if possible

This commit is contained in:
Andrew Dolgov
2019-08-14 17:04:14 +03:00
parent 68e2b05f65
commit d4df57e1a4
3 changed files with 30 additions and 10 deletions

View File

@@ -156,8 +156,9 @@ class Handler_Public extends Handler {
$tpl->setVariable('ARTICLE_ENCLOSURE_LENGTH', null, true);
}
$tpl->setVariable('ARTICLE_OG_IMAGE',
Article::get_article_image($enclosures, $line['content'], $feed_site_url), true);
list ($og_image, $og_stream) = Article::get_article_image($enclosures, $line['content'], $feed_site_url);
$tpl->setVariable('ARTICLE_OG_IMAGE', $og_image, true);
$tpl->addBlock('entry');
}
@@ -381,7 +382,7 @@ class Handler_Public extends Handler {
$rv .= "</head>";
$og_image = Article::get_article_image($enclosures, $line['content'], $line["site_url"]);
list ($og_image, $og_stream) = Article::get_article_image($enclosures, $line['content'], $line["site_url"]);
if ($og_image) {
$rv .= "<meta property='og:image' content=\"" . htmlspecialchars($og_image) . "\"/>";