]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add title attribute on attachment list items
authorBrion Vibber <brion@status.net>
Wed, 10 Nov 2010 00:43:37 +0000 (16:43 -0800)
committerBrion Vibber <brion@status.net>
Wed, 10 Nov 2010 00:43:37 +0000 (16:43 -0800)
lib/attachmentlist.php

index f9ef7499e1f791172d56391188b66a60d3ca2f3b..6e127af8646a46ec47c1a6da98187464d43c0fd2 100644 (file)
@@ -197,7 +197,10 @@ class AttachmentListItem extends Widget
     }
 
     function linkAttr() {
-        return array('class' => 'attachment', 'href' => $this->attachment->url, 'id' => 'attachment-' . $this->attachment->id);
+        return array('class' => 'attachment',
+                     'href' => $this->attachment->url,
+                     'id' => 'attachment-' . $this->attachment->id,
+                     'title' => $this->title());
     }
 
     function showLink() {
@@ -244,8 +247,9 @@ class AttachmentListItem extends Widget
                 case 'image/jpeg':
                     $thumb = (object)array();
                     $thumb->url = $enc->url;
-                    $thumb->width = 100;
-                    $thumb->height = 75; // @fixme
+                    // @fixme use the given width/height aspect
+                    $thumb->width = common_config('attachments', 'thumb_width');
+                    $thumb->height = common_config('attachments', 'thumb_height');
                     return $thumb;
             }
         }