]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
Merge branch 'backupaccount-xml' into 'nightly'
[quix0rs-gnu-social.git] / actions / showstream.php
index dbe74197dcd7fa9c380010abc3e03ed251c85ad4..79a3706d77fbe688f8044be64cf706fe91d24f70 100644 (file)
@@ -113,6 +113,18 @@ class ShowstreamAction extends NoticestreamAction
                                           $this->target->getNickname(), $this->tag)));
         }
 
+        if (!$this->target->isLocal()) {
+            // remote profiles at least have Atom, but we can't guarantee anything else
+            return array(
+                     new Feed(Feed::ATOM,
+                              $this->target->getAtomFeed(),
+                              // TRANS: Title for link to notice feed.
+                              // TRANS: %s is a user nickname.
+                              sprintf(_('Notice feed for %s (Atom)'),
+                                      $this->target->getNickname()))
+                     );
+        }
+
         return array(new Feed(Feed::JSON,
                               common_local_url('ApiTimelineUser',
                                                array(
@@ -139,10 +151,7 @@ class ShowstreamAction extends NoticestreamAction
                               sprintf(_('Notice feed for %s (RSS 2.0)'),
                                       $this->target->getNickname())),
                      new Feed(Feed::ATOM,
-                              common_local_url('ApiTimelineUser',
-                                               array(
-                                                    'id' => $this->target->getID(),
-                                                    'format' => 'atom')),
+                              $this->target->getAtomFeed(),
                               // TRANS: Title for link to notice feed.
                               // TRANS: %s is a user nickname.
                               sprintf(_('Notice feed for %s (Atom)'),
@@ -173,12 +182,6 @@ class ShowstreamAction extends NoticestreamAction
                                          'content' => $this->target->getDescription()));
         }
 
-        // See https://wiki.mozilla.org/Microsummaries
-
-        $this->element('link', array('rel' => 'microsummary',
-                                     'href' => common_local_url('microsummary',
-                                                                array('nickname' => $this->target->getNickname()))));
-
         $rsd = common_local_url('rsd',
                                 array('nickname' => $this->target->getNickname()));
 
@@ -221,19 +224,20 @@ class ShowstreamAction extends NoticestreamAction
 
     function showNotices()
     {
-        $pnl = new NoticeList($this->notice, $this);
+        $pnl = new PrimaryNoticeList($this->notice, $this);
         $cnt = $pnl->show();
         if (0 == $cnt) {
             $this->showEmptyListMessage();
         }
 
-        $args = array('nickname' => $this->target->getNickname());
+        // either nickname or id will be used, depending on which action (showstream, userbyid...)
+        $args = array('nickname' => $this->target->getNickname(), 'id' => $this->target->getID());
         if (!empty($this->tag))
         {
             $args['tag'] = $this->tag;
         }
         $this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page,
-                          'showstream', $args);
+                          $this->getActionName(), $args);
     }
 
     function showAnonymousMessage()
@@ -257,15 +261,6 @@ class ShowstreamAction extends NoticestreamAction
         $this->elementEnd('div');
     }
 
-    function showSections()
-    {
-        parent::showSections();
-        if (!common_config('performance', 'high')) {
-            $cloud = new PersonalTagCloudSection($this->target, $this);
-            $cloud->show();
-        }
-    }
-
     function noticeFormOptions()
     {
         $options = parent::noticeFormOptions();