aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-05-25 07:39:47 -0400
committerCash Costello <cash.costello@gmail.com>2010-05-25 07:39:47 -0400
commitbfcd3e087980e48b5b908fd30cf2e9b1aa3726e4 (patch)
tree9dc3d2424902da2863c69bd6fe175c5ceb7a8003 /views
parenta19ccb50eed9be0aab45cb72ee367fb3cbd47ab2 (diff)
downloadelgg-bfcd3e087980e48b5b908fd30cf2e9b1aa3726e4.tar.gz
elgg-bfcd3e087980e48b5b908fd30cf2e9b1aa3726e4.tar.bz2
Updated the RSS for language file and added files missing from previous commits
Diffstat (limited to 'views')
-rw-r--r--views/opensearch_rss/page_shells/default.php8
-rw-r--r--views/opensearch_rss/search/listing.php1
-rw-r--r--views/xml/opensearch/description.php6
3 files changed, 6 insertions, 9 deletions
diff --git a/views/opensearch_rss/page_shells/default.php b/views/opensearch_rss/page_shells/default.php
index 52aa8854c..e9510e9da 100644
--- a/views/opensearch_rss/page_shells/default.php
+++ b/views/opensearch_rss/page_shells/default.php
@@ -12,9 +12,9 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
// Set title
$search_terms = get_input('q');
$title = $vars['config']->sitename;
-$title .= " Search: $search_terms";
+$title .= ' ' . sprintf(elgg_echo('opensearch:title'), $search_terms);
-$description = "Search results for \"$search_terms\"";
+$description = sprintf(elgg_echo('opensearch:description'), $search_terms);
// Remove viewtype from URL
$search_url = str_replace('&view=opensearch_rss','', full_url());
@@ -29,10 +29,8 @@ $os_url = "{$vars['url']}pg/opensearch/osd.xml";
<link><?php echo $search_url; ?></link>
<description><?php echo $description; ?></description>
<opensearch:totalResults><?php echo $OPEN_SEARCH_COUNT; ?></opensearch:totalResults>
- <opensearch:startIndex>1</opensearch:startIndex>
- <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
<atom:link rel="search" type="application/opensearchdescription+xml" href="<?php echo $os_url; ?>"/>
- <opensearch:Query role="request" searchTerms="<?php echo $search_terms; ?>" startPage="1" />
+ <opensearch:Query role="request" searchTerms="<?php echo addslashes($search_terms); ?>" startPage="1" />
<?php
echo $vars['body'];
diff --git a/views/opensearch_rss/search/listing.php b/views/opensearch_rss/search/listing.php
index 367bf332f..219462976 100644
--- a/views/opensearch_rss/search/listing.php
+++ b/views/opensearch_rss/search/listing.php
@@ -7,7 +7,6 @@ if (!isset($OPEN_SEARCH_COUNT)) {
$OPEN_SEARCH_COUNT += $vars['results']['count'];
-//var_dump($vars['results']);
elgg_set_viewtype('rss');
$entities = $vars['results']['entities'];
diff --git a/views/xml/opensearch/description.php b/views/xml/opensearch/description.php
index f8eb0b040..a77701d46 100644
--- a/views/xml/opensearch/description.php
+++ b/views/xml/opensearch/description.php
@@ -16,7 +16,7 @@ extract($config);
$site = get_entity($CONFIG->site_guid);
$email = $site->email;
-$rss_url = "{$vars['url']}pg/opensearch/?q={searchTerms}&amp;pw={startPage?}&amp;format=rss";
+$rss_url = "{$vars['url']}pg/search/?q={searchTerms}&amp;view=opensearch_rss";
$html_url = "{$vars['url']}pg/search/?q={searchTerms}";
?>
@@ -27,8 +27,8 @@ $html_url = "{$vars['url']}pg/search/?q={searchTerms}";
<LongName><?php echo $longname; ?></LongName>
<?php endif; ?>
<Contact><?php echo $site->email; ?></Contact>
- <Url type="text/html" indexOffset="0" template="<?php echo $html_url; ?>"/>
- <Url type="application/rss+xml" indexOffset="0" template="<?php echo $rss_url; ?>"/>
+ <Url type="text/html" template="<?php echo $html_url; ?>"/>
+ <Url type="application/rss+xml" template="<?php echo $rss_url; ?>"/>
<?php if (isset($ico)): ?>
<Image height="16" width="16" type="image/vnd.microsoft.icon"><?php echo "{$vars['url']}$ico"; ?></Image>
<?php endif; ?>