]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/inlineattachmentlist.php
Whitespace updates.
[quix0rs-gnu-social.git] / lib / inlineattachmentlist.php
index 8b1a1cd9bb30b40be4e82923a6aa1d2c19048f16..a0243c825f673cffcfbf5398555ace1321540a8f 100644 (file)
@@ -58,11 +58,20 @@ class InlineAttachmentList extends AttachmentList
 
 class InlineAttachmentListItem extends AttachmentListItem
 {
+    protected $thumb;
+
     function show()
     {
-        if ($this->attachment->isEnclosure()) {
+        $this->thumb = parent::getThumbInfo();
+        if (!empty($this->thumb)) {
             parent::show();
         }
+
+    }
+
+    function getThumbInfo()
+    {
+        return $this->thumb;
     }
 
     function showLink() {
@@ -71,6 +80,17 @@ class InlineAttachmentListItem extends AttachmentListItem
         $this->out->elementEnd('a');
     }
 
+    /**
+     * Build HTML attributes for the link
+     * @return array
+     */
+    function linkAttr()
+    {
+        $attr = parent::linkAttr();
+        $attr['class'] = 'attachment-thumbnail';
+        return $attr;
+    }
+
     /**
      * start a single notice.
      *