. /** * FIXME * * @category Widget * @package GNUsocial * @author Evan Prodromou * @copyright 2009 StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ defined('GNUSOCIAL') || die(); /** * FIXME * * These are the widgets that show interesting data about a person * group, or site. * * @category Widget * @package GNUsocial * @author Evan Prodromou * @copyright 2009 StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ class AttachmentNoticeSection extends NoticeSection { public function showContent() { parent::showContent(); return false; } public 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->selectAdd('notice.id'); $notice->orderBy('notice.created DESC, notice.id DESC'); $notice->find(); return $notice; } public function title() { // TRANS: Title. return _('Notices where this attachment appears'); } public function divId() { return 'attachment_section'; } }