forked from GNUsocial/gnu-social
show thumbnails even for links that arent enclosures
This commit is contained in:
parent
f0ea629990
commit
5fd08b798f
|
@ -58,11 +58,20 @@ class InlineAttachmentList extends AttachmentList
|
||||||
|
|
||||||
class InlineAttachmentListItem extends AttachmentListItem
|
class InlineAttachmentListItem extends AttachmentListItem
|
||||||
{
|
{
|
||||||
|
protected $thumb;
|
||||||
|
|
||||||
function show()
|
function show()
|
||||||
{
|
{
|
||||||
if ($this->attachment->isEnclosure()) {
|
$this->thumb = parent::getThumbInfo();
|
||||||
|
if (!empty($this->thumb)) {
|
||||||
parent::show();
|
parent::show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getThumbInfo()
|
||||||
|
{
|
||||||
|
return $this->thumb;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLink() {
|
function showLink() {
|
||||||
|
|
Loading…
Reference in New Issue