diff options
Diffstat (limited to 'views/opensearch_rss')
-rw-r--r-- | views/opensearch_rss/page/default.php (renamed from views/opensearch_rss/page_shells/default.php) | 14 | ||||
-rw-r--r-- | views/opensearch_rss/page/layouts/default.php | 5 | ||||
-rw-r--r-- | views/opensearch_rss/pageshells/pageshell.php | 6 | ||||
-rw-r--r-- | views/opensearch_rss/search/layout.php | 3 | ||||
-rw-r--r-- | views/opensearch_rss/search/list.php (renamed from views/opensearch_rss/search/listing.php) | 3 |
5 files changed, 19 insertions, 12 deletions
diff --git a/views/opensearch_rss/page_shells/default.php b/views/opensearch_rss/page/default.php index e9510e9da..79cd544c4 100644 --- a/views/opensearch_rss/page_shells/default.php +++ b/views/opensearch_rss/page/default.php @@ -1,4 +1,7 @@ <?php +/** + * Page shell for OpenSearch RSS feed + */ global $OPEN_SEARCH_COUNT; @@ -11,16 +14,15 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; // Set title $search_terms = get_input('q'); -$title = $vars['config']->sitename; -$title .= ' ' . sprintf(elgg_echo('opensearch:title'), $search_terms); +$title = elgg_get_site_entity()->name; +$title .= ' ' . elgg_echo('opensearch:title', array($search_terms)); -$description = sprintf(elgg_echo('opensearch:description'), $search_terms); +$description = elgg_echo('opensearch:description', array($search_terms)); // Remove viewtype from URL -$search_url = str_replace('&view=opensearch_rss','', full_url()); - -$os_url = "{$vars['url']}pg/opensearch/osd.xml"; +$search_url = str_replace('&view=opensearch_rss', '', full_url()); +$os_url = elgg_normalize_url('opensearch/osd.xml'); ?> <rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> diff --git a/views/opensearch_rss/page/layouts/default.php b/views/opensearch_rss/page/layouts/default.php new file mode 100644 index 000000000..488734f84 --- /dev/null +++ b/views/opensearch_rss/page/layouts/default.php @@ -0,0 +1,5 @@ +<?php +/** + * OpenSearch RSS layout shell + */ +echo $vars['content'];
\ No newline at end of file diff --git a/views/opensearch_rss/pageshells/pageshell.php b/views/opensearch_rss/pageshells/pageshell.php deleted file mode 100644 index f883f236a..000000000 --- a/views/opensearch_rss/pageshells/pageshell.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php -/** - * To support Elgg 1.7 - */ - -require_once(dirname(dirname(__FILE__)) . "/page_shells/default.php"); diff --git a/views/opensearch_rss/search/layout.php b/views/opensearch_rss/search/layout.php index 4cd2ff050..d5bb9fe57 100644 --- a/views/opensearch_rss/search/layout.php +++ b/views/opensearch_rss/search/layout.php @@ -1,2 +1,5 @@ <?php +/** + * OpenSearch search layout + */ echo $vars['body'];
\ No newline at end of file diff --git a/views/opensearch_rss/search/listing.php b/views/opensearch_rss/search/list.php index 219462976..bc7b5574e 100644 --- a/views/opensearch_rss/search/listing.php +++ b/views/opensearch_rss/search/list.php @@ -1,4 +1,7 @@ <?php +/** + * OpenSearch serach results list + */ global $OPEN_SEARCH_COUNT; if (!isset($OPEN_SEARCH_COUNT)) { |