12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class AttachmentNoticeSection extends NoticeSection
- {
- function showContent() {
- parent::showContent();
- return false;
- }
- function getNotices()
- {
- $notice = new Notice;
- $notice->joinAdd(array('id', 'file_to_post:post_id'));
- $notice->whereAdd(sprintf('file_to_post.file_id = %d', $this->out->attachment->id));
- $notice->orderBy('created desc');
- $notice->selectAdd('post_id as id');
- $notice->find();
- return $notice;
- }
- function title()
- {
-
- return _('Notices where this attachment appears');
- }
- function divId()
- {
- return 'attachment_section';
- }
- }
|