]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Show notice feed URLs (and author)
authorMikael Nordfeldth <mmn@hethane.se>
Wed, 17 Feb 2016 22:32:56 +0000 (23:32 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Wed, 17 Feb 2016 22:32:56 +0000 (23:32 +0100)
actions/shownotice.php

index 64cf38afa7960d59acd38faa00569918b3acd91c..b2385ec1d7b71edcbe3f1ffbf07a0309ec1b412b 100644 (file)
@@ -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)'))));
     }
 
     /**