X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=ad792441a3794765df430698c0721a65b0737e37;hb=45430d2b3b952dda31d232c2726e5980a7e6e56a;hp=c00942af4998226b3bdee957b29f849486005b1f;hpb=4df1ea49ec75ec9dd64bc8f58c01e64ea18bedc7;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index c00942af49..ad792441a3 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -205,24 +205,10 @@ class NoticeListItem extends Widget return 'shownotice' !== $this->out->args['action']; } -/* - function attachmentCount($discriminant = true) { - $file_oembed = new File_oembed; - $query = "select count(*) as c from file_oembed join file_to_post on file_oembed.file_id = file_to_post.file_id where post_id=" . $this->notice->id; - $file_oembed->query($query); - $file_oembed->fetch(); - return intval($file_oembed->c); - } -*/ - - function showWithAttachment() { - } - function showNoticeInfo() { $this->out->elementStart('div', 'entry-content'); $this->showNoticeLink(); -// $this->showWithAttachment(); $this->showNoticeSource(); $this->showContext(); $this->out->elementEnd('div'); @@ -365,7 +351,7 @@ class NoticeListItem extends Widget } $uploaded = $this->notice->getUploadedAttachment(); if ($uploaded) { - $this->out->element('a', array('href' => $uploaded, 'class' => 'attachment'), $uploaded); + $this->out->element('a', array('href' => $uploaded[0], 'class' => 'attachment', 'id' => 'attachment-' . $uploaded[1]), $uploaded[0]); } $this->out->elementEnd('p'); }