X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=44726a17b7b7a3da4116724bc0ed1d4c69b8d35b;hb=a0f6b4f078252389eacf53dce1c5ca10951c76ac;hp=50a95cfcbb2a96e2a707a350119f518f0513859f;hpb=0b53a820c2b4224b66b2a24f67302b4c5ca1deed;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index 50a95cfcbb..44726a17b7 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -50,7 +50,6 @@ require_once INSTALLDIR.'/lib/attachmentlist.php'; * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://laconi.ca/ * @see Notice - * @see StreamAction * @see NoticeListItem * @see ProfileNoticeList */ @@ -86,7 +85,7 @@ class NoticeList extends Widget { $this->out->elementStart('div', array('id' =>'notices_primary')); $this->out->element('h2', null, _('Notices')); - $this->out->elementStart('ul', array('class' => 'notices')); + $this->out->elementStart('ol', array('class' => 'notices xoxo')); $cnt = 0; @@ -101,7 +100,7 @@ class NoticeList extends Widget $item->show(); } - $this->out->elementEnd('ul'); + $this->out->elementEnd('ol'); $this->out->elementEnd('div'); return $cnt; @@ -180,7 +179,6 @@ class NoticeListItem extends Widget { $this->showStart(); $this->showNotice(); - $this->showNoticeAttachments(); $this->showNoticeInfo(); $this->showNoticeOptions(); $this->showEnd(); @@ -194,26 +192,6 @@ class NoticeListItem extends Widget $this->out->elementEnd('div'); } - function showNoticeAttachments() { - if ($this->isUsedInList()) { - return; - } - $al = new AttachmentList($this->notice, $this->out); - $al->show(); - } - - function isUsedInList() { - 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 showNoticeInfo() { $this->out->elementStart('div', 'entry-content'); @@ -388,6 +366,7 @@ class NoticeListItem extends Widget $this->out->element('abbr', array('class' => 'published', 'title' => $dt), common_date_string($this->notice->created)); + $this->out->elementEnd('a'); $this->out->elementEnd('dd'); $this->out->elementEnd('dl'); @@ -453,7 +432,7 @@ class NoticeListItem extends Widget $this->out->elementStart('dl', 'response'); $this->out->element('dt', null, _('To')); $this->out->elementStart('dd'); - $this->out->element('a', array('href' => $convurl), + $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id), _('in context')); $this->out->elementEnd('dd'); $this->out->elementEnd('dl');