aboutsummaryrefslogtreecommitdiff
path: root/mod/opensearch/views/opensearch_rss/search
diff options
context:
space:
mode:
Diffstat (limited to 'mod/opensearch/views/opensearch_rss/search')
-rw-r--r--mod/opensearch/views/opensearch_rss/search/layout.php5
-rw-r--r--mod/opensearch/views/opensearch_rss/search/list.php27
2 files changed, 32 insertions, 0 deletions
diff --git a/mod/opensearch/views/opensearch_rss/search/layout.php b/mod/opensearch/views/opensearch_rss/search/layout.php
new file mode 100644
index 000000000..d5bb9fe57
--- /dev/null
+++ b/mod/opensearch/views/opensearch_rss/search/layout.php
@@ -0,0 +1,5 @@
+<?php
+/**
+ * OpenSearch search layout
+ */
+echo $vars['body']; \ No newline at end of file
diff --git a/mod/opensearch/views/opensearch_rss/search/list.php b/mod/opensearch/views/opensearch_rss/search/list.php
new file mode 100644
index 000000000..bc7b5574e
--- /dev/null
+++ b/mod/opensearch/views/opensearch_rss/search/list.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * OpenSearch serach results list
+ */
+
+global $OPEN_SEARCH_COUNT;
+if (!isset($OPEN_SEARCH_COUNT)) {
+ $OPEN_SEARCH_COUNT = 0;
+}
+
+$OPEN_SEARCH_COUNT += $vars['results']['count'];
+
+
+elgg_set_viewtype('rss');
+$entities = $vars['results']['entities'];
+foreach ($entities as $entity) {
+ if ($view = search_get_search_view($vars['params'], 'entity')) {
+ $body .= elgg_view($view, array(
+ 'entity' => $entity,
+ 'params' => $vars['params'],
+ 'results' => $vars['results']
+ ));
+ }
+}
+elgg_set_viewtype('opensearch_rss');
+
+echo $body; \ No newline at end of file