RSS Feed/News \XF\Entity\Thread::getCoverImage does not consider all thumbnails as candidates

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,695
Points
823

Reputation:

PHP:

Code:
$attachments = $attachments->filter(function(Attachment $attachment) use ($canViewAttachments)
{
    if ($attachment->type_grouping != 'image')
    {
        return false;
    }

return $canViewAttachments || $attachment->hasThumbnail();
});

This code ignores attachments that have thumbnails but are not grouped as images.

Changing this to
PHP:

Code:
$attachments = $attachments->filter(function(Attachment $attachment) use ($canViewAttachments)
{
    return $canViewAttachments ||...

Read more

Continue reading...
 
Status
Not open for further replies.
Top