]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac #233 Explicitely show we have an rss feed for notice searches.
authorRobin Millette <millette@controlyourself.ca>
Tue, 10 Feb 2009 22:04:47 +0000 (22:04 +0000)
committerRobin Millette <millette@controlyourself.ca>
Tue, 10 Feb 2009 22:04:47 +0000 (22:04 +0000)
actions/noticesearch.php
lib/feedlist.php

index a5f01350c4c732bfd1fab1e87ecb8b57873c9ee5..2d94a7906fea3095832a5cef20570583084a61da 100644 (file)
@@ -78,6 +78,62 @@ class NoticesearchAction extends SearchAction
         return _('Text search');
     }
 
+
+    function showExportData()
+    {
+        $q = $this->trimmed('q');
+        if (!$q) {
+            return;
+        }
+        $fl = new FeedList($this);
+        $fl->show(array(0 => array('href' => common_local_url('noticesearchrss', array('q' => $q)),
+                                   'type' => 'rss',
+                                   'version' => 'RSS 1.0',
+                                   'item' => 'noticesearchrss')));
+    }
+
+
+
+    function showFeeds()
+    {  
+        $q = $this->trimmed('q');
+        if (!$q) {
+            return;
+        }
+
+       $this->element('link', array('rel' => 'alternate',
+                                         'href' => common_local_url('noticesearchrss',
+                                                                    array('q' => $q)),
+                                         'type' => 'application/rss+xml',
+                                         'title' => _('Search Stream Feed')));
+    }
+
+
+    /**
+     * Show header
+     *
+     * @param array $arr array containing the query
+     *
+     * @return void
+     */
+
+    function extraHead2()
+    {
+        $q = $this->trimmed('q');
+        if ($q) {
+            $this->element('link', array('rel' => 'alternate',
+                                         'href' => common_local_url('noticesearchrss',
+                                                                    array('q' => $q)),
+                                         'type' => 'application/rss+xml',
+                                         'title' => _('Search Stream Feed')));
+        }
+    }
+
+
+
+
+
+
     /**
      * Show results
      *
@@ -119,26 +175,6 @@ class NoticesearchAction extends SearchAction
                           $page, 'noticesearch', array('q' => $q));
     }
 
-    /**
-     * Show header
-     *
-     * @param array $arr array containing the query
-     *
-     * @return void
-     */
-
-    function extraHead()
-    {
-        $q = $this->trimmed('q');
-        if ($q) {
-            $this->element('link', array('rel' => 'alternate',
-                                         'href' => common_local_url('noticesearchrss',
-                                                                    array('q' => $q)),
-                                         'type' => 'application/rss+xml',
-                                         'title' => _('Search Stream Feed')));
-        }
-    }
-
     /**
      * Show notice
      *
index 47d909e969c1ac51986f7448e7c3996630ff4c7d..8bfcb9c5ab37bd53f174efbc0cdcee13620d282b 100644 (file)
@@ -112,6 +112,13 @@ class FeedList extends Widget
             $feed['textContent'] = "Atom";
             break;
 
+         case 'noticesearchrss':
+            $feed_classname = $feed['type'];
+            $feed_mimetype = "application/".$feed['type']."+xml";
+            $feed_title = $feed['version']." feed for this notice search";
+            $feed['textContent'] = "RSS";
+            break;
+
          case 'tagrss':
             $feed_classname = $feed['type'];
             $feed_mimetype = "application/".$feed['type']."+xml";