From: mmn Date: Mon, 14 Dec 2015 21:03:38 +0000 (+0000) Subject: Merge branch 'repost-of-uf2' into 'master' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2addf8e456f96c60de4edabf2409c4ec49013aab;p=quix0rs-gnu-social.git Merge branch 'repost-of-uf2' into 'master' Mark up link to original as a repost for repeats http://indiewebcamp.com/repost See merge request !46 --- 2addf8e456f96c60de4edabf2409c4ec49013aab diff --cc lib/noticelistitem.php index ae00921bb1,5c613df859..d7cc57188d --- a/lib/noticelistitem.php +++ b/lib/noticelistitem.php @@@ -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'));