]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
ServerErrorAction always logs
[quix0rs-gnu-social.git] / lib / noticelist.php
index e3361fc99e89e20ec287e7d0a2cfa198df87b66e..44726a17b7b7a3da4116724bc0ed1d4c69b8d35b 100644 (file)
@@ -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,10 +179,8 @@ class NoticeListItem extends Widget
     {
         $this->showStart();
         $this->showNotice();
-        $this->showNoticeAttachmentsIcon();
         $this->showNoticeInfo();
         $this->showNoticeOptions();
-        $this->showNoticeAttachments();
         $this->showEnd();
     }
 
@@ -195,41 +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() {
-        $f2p = new File_to_post;
-        $f2p->post_id = $this->notice->id;
-        $file = new File;
-        $file->joinAdd($f2p);
-        $file->selectAdd();
-        $file->selectAdd('file.id as id');
-        return $file->find(true);
-    }
-
-    function showNoticeAttachmentsIcon()
-    {
-        if (!($this->isUsedInList() && ($count = $this->attachmentCount()))) {
-            return;
-        }
-
-        $href = common_local_url('shownotice', array('notice' => $this->notice->id)) . '#attachments';
-
-        $this->out->elementStart('p', 'entry-attachments');
-        $this->out->element('a', array('href' => $href, 'title' => "# of attachments: $count"), $count === 1 ? '' : $count);
-        $this->out->elementEnd('p');
-    }
-
     function showNoticeInfo()
     {
         $this->out->elementStart('div', 'entry-content');
@@ -404,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');
@@ -469,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');