Restore partial condition in OEmbed block of ParseUrl::getSiteInfo

This commit is contained in:
Hypolite Petovan 2018-09-16 09:18:31 -04:00
parent 5b5e5ef4db
commit 102adf86ae

View file

@ -161,14 +161,17 @@ class ParseUrl
$siteinfo['type'] = $oembed_data->type; $siteinfo['type'] = $oembed_data->type;
} }
if (isset($oembed_data->title)) { // See https://github.com/friendica/friendica/pull/5763#discussion_r217913178
$siteinfo['title'] = trim($oembed_data->title); if ($siteinfo['type'] != 'photo') {
} if (isset($oembed_data->title)) {
if (isset($oembed_data->description)) { $siteinfo['title'] = trim($oembed_data->title);
$siteinfo['text'] = trim($oembed_data->description); }
} if (isset($oembed_data->description)) {
if (isset($oembed_data->thumbnail_url)) { $siteinfo['text'] = trim($oembed_data->description);
$siteinfo['image'] = $oembed_data->thumbnail_url; }
if (isset($oembed_data->thumbnail_url)) {
$siteinfo['image'] = $oembed_data->thumbnail_url;
}
} }
} }
} }