]> 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

lib/noticelistitem.php

index ae00921bb15883fe8d85a0cec312ce73312cbe32..d7cc57188d936586917ef5b06e3b35b7d2a5d302 100644 (file)
@@ -537,6 +537,19 @@ class NoticeListItem extends Widget
         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(true),