]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'repost-of-uf2' into 'master'
authormmn <mmn@hethane.se>
Mon, 14 Dec 2015 21:03:38 +0000 (21:03 +0000)
committermmn <mmn@hethane.se>
Mon, 14 Dec 2015 21:03:38 +0000 (21:03 +0000)
Mark up link to original as a repost for repeats

http://indiewebcamp.com/repost

See merge request !46

1  2 
lib/noticelistitem.php

index ae00921bb15883fe8d85a0cec312ce73312cbe32,5c613df859474a39bb4ba78228e158227e3fafda..d7cc57188d936586917ef5b06e3b35b7d2a5d302
@@@ -537,9 -516,22 +537,22 @@@ class NoticeListItem extends Widge
          if (!$this->notice->isLocal()) {
              $class .= ' external';
          }
+         try {
+             if($this->repeat) {
+                 $this->out->element('a',
+                             array('href' => $this->repeat->getUrl(),
+                                   'class' => 'u-url'),
+                             '');
+                 $class = str_replace('u-url', 'u-repost-of', $class);
+             }
+         } catch (InvalidUrlException $e) {
+             // no permalink available
+         }
          try {
              $this->out->element('a',
 -                        array('href' => $this->notice->getUrl(),
 +                        array('href' => $this->notice->getUrl(true),
                                'class' => $class),
                          // TRANS: Addition in notice list item for single-notice view.
                          _('permalink'));