summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-11 09:54:23 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-11 09:54:23 -0500
commit26b0bc3aab831c26058274554580e3beb68b1113 (patch)
tree360f787d9f68daa4f744a61f05115bb5ab738c9e
parent880d0b477b254d62f68b2a894ff558448693e37a (diff)
parent7763f804cafa6f41316e30512c4ceab9b78f2c08 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r--actions/noticesearch.php76
-rw-r--r--lib/feedlist.php7
2 files changed, 63 insertions, 20 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php
index a5f01350c..2d94a7906 100644
--- a/actions/noticesearch.php
+++ b/actions/noticesearch.php
@@ -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
*
@@ -120,26 +176,6 @@ class NoticesearchAction extends SearchAction
}
/**
- * 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
*
* @param class $notice notice
diff --git a/lib/feedlist.php b/lib/feedlist.php
index 47d909e96..8bfcb9c5a 100644
--- a/lib/feedlist.php
+++ b/lib/feedlist.php
@@ -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";