]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/tag.php
Added filler text to popular page for when it's empty, encouraging user to add favori...
[quix0rs-gnu-social.git] / actions / tag.php
index 4401f892a94603df41e2b06748bba5cca35bcb05..d15f64498dc0c76e2fd1f5c47f20889c7e82ec37 100644 (file)
@@ -33,13 +33,15 @@ class TagAction extends Action
         }
 
         if ($this->tag != $taginput) {
-            common_redirect(common_local_url('tag', array('tag' => $this->tag)));
+            common_redirect(common_local_url('tag', array('tag' => $this->tag)),
+                            301);
+            return false;
         }
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
-        
+
         common_set_returnto($this->selfUrl());
-        
+
         return true;
     }
 
@@ -61,12 +63,11 @@ class TagAction extends Action
         $this->showPage();
     }
 
-    function showFeeds()
+    function getFeeds()
     {
-        $this->element('link', array('rel' => 'alternate',
-                                     'href' => common_local_url('tagrss', array('tag' => $this->tag)),
-                                     'type' => 'application/rss+xml',
-                                     'title' => sprintf(_('Feed for tag %s'), $this->tag)));
+        return array(new Feed(Feed::RSS1,
+                              common_local_url('tagrss', array('tag' => $this->tag)),
+                              sprintf(_('Feed for tag %s'), $this->tag)));
     }
 
     function showPageNotice()
@@ -74,15 +75,6 @@ class TagAction extends Action
         return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);
     }
 
-    function showExportData()
-    {
-        $fl = new FeedList($this);
-        $fl->show(array(0=>array('href'=>common_local_url('tagrss', array('tag' => $this->tag)),
-                                 'type' => 'rss',
-                                 'version' => 'RSS 1.0',
-                                 'item' => 'tagrss')));
-    }
-
     function showContent()
     {
         $notice = Notice_tag::getStream($this->tag, (($this->page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE + 1);