]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Mark up link to original as a repost for repeats
authorStephen Paul Weber <singpolyma@singpolyma.net>
Fri, 23 Oct 2015 19:00:08 +0000 (19:00 +0000)
committerStephen Paul Weber <singpolyma@singpolyma.net>
Fri, 23 Oct 2015 19:12:25 +0000 (19:12 +0000)
http://indiewebcamp.com/repost

lib/noticelistitem.php

index dc171409f41e8042040c38a174a242d3c0c9f3cd..5c613df859474a39bb4ba78228e158227e3fafda 100644 (file)
@@ -516,6 +516,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(),