aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-02-17 23:32:56 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-02-17 23:32:56 +0100
commitd9b649642d6e7cf365f1b62d65d2628b9cf049d9 (patch)
tree1d64af36007f3afcfb879595adf7a2a853c4904d /actions
parentd2c11925bfafa5a2842267cd90616aa7e1f4882b (diff)
downloadgnu-social-d9b649642d6e7cf365f1b62d65d2628b9cf049d9.tar
gnu-social-d9b649642d6e7cf365f1b62d65d2628b9cf049d9.zip
Show notice feed URLs (and author)
Diffstat (limited to 'actions')
-rw-r--r--actions/shownotice.php25
1 files changed, 19 insertions, 6 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 64cf38afa7..b2385ec1d7 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -74,6 +74,7 @@ class ShownoticeAction extends ManagedAction
}
$this->notice = $this->getNotice();
+ $this->target = $this->notice;
if (!$this->notice->inScope($this->scoped)) {
// TRANS: Client exception thrown when trying a view a notice the user has no access to.
@@ -213,12 +214,24 @@ class ShownoticeAction extends ManagedAction
{
}
- /**
- * Don't show aside
- *
- * @return void
- */
- function showAside() {
+ function getFeeds()
+ {
+ return array(new Feed(Feed::JSON,
+ common_local_url('ApiStatusesShow',
+ array(
+ 'id' => $this->target->getID(),
+ 'format' => 'json')),
+ // TRANS: Title for link to single notice representation.
+ // TRANS: %s is a user nickname.
+ sprintf(_('Single notice (JSON)'))),
+ new Feed(Feed::ATOM,
+ common_local_url('ApiStatusesShow',
+ array(
+ 'id' => $this->target->getID(),
+ 'format' => 'atom')),
+ // TRANS: Title for link to notice feed.
+ // TRANS: %s is a user nickname.
+ sprintf(_('Single notice (Atom)'))));
}
/**