diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-05-26 21:20:04 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-05-26 21:20:04 -0400 |
commit | af700ea27703bbec5aa1078a84f9fd44c0260322 (patch) | |
tree | a227167390948f5791b8190435fbb9cfdbd0bc38 /lib/noticelist.php | |
parent | 4edb1c6e0cfcaee256757ed20b4ff8d482158906 (diff) |
Let's you upload a file with a notice and have it shown with other attachments.
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r-- | lib/noticelist.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php index 50a95cfcb..420272515 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -206,6 +206,7 @@ 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; @@ -213,11 +214,16 @@ class NoticeListItem extends Widget $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'); @@ -388,6 +394,11 @@ class NoticeListItem extends Widget $this->out->element('abbr', array('class' => 'published', 'title' => $dt), common_date_string($this->notice->created)); + + $f2p = File_to_post::staticGet('post_id', $this->notice->id); + if (!empty($f2p)) { + $this->out->text(_(' (with attachments) ')); + } $this->out->elementEnd('a'); $this->out->elementEnd('dd'); $this->out->elementEnd('dl'); |