mirror of
https://github.com/friendica/friendica
synced 2025-05-03 09:04:10 +02:00
Picture posts do work again - everything else should work as well
This commit is contained in:
parent
04fb885857
commit
1d4a5402ff
2 changed files with 17 additions and 14 deletions
|
@ -271,11 +271,9 @@ class ParseUrl
|
|||
$siteinfo['image'] = $meta_tag['content'];
|
||||
break;
|
||||
case 'twitter:card':
|
||||
// Convert Twitter types in our own
|
||||
// Detect photo pages
|
||||
if ($meta_tag['content'] == 'summary_large_image') {
|
||||
$siteinfo['type'] = 'photo';
|
||||
} else {
|
||||
$siteinfo['type'] = $meta_tag['content'];
|
||||
}
|
||||
break;
|
||||
case 'twitter:description':
|
||||
|
@ -334,6 +332,11 @@ class ParseUrl
|
|||
}
|
||||
}
|
||||
|
||||
// Prevent to have a photo type without an image
|
||||
if (empty($siteinfo['image']) && (siteinfo['type'] == 'photo')) {
|
||||
$siteinfo['type'] = 'link';
|
||||
}
|
||||
|
||||
if ((@$siteinfo['image'] == '') && !$no_guessing) {
|
||||
$list = $xpath->query('//img[@src]');
|
||||
foreach ($list as $node) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue