aboutsummaryrefslogtreecommitdiff
path: root/views/xml/opensearch
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-02 22:05:50 -0500
committercash <cash.costello@gmail.com>2011-12-02 22:05:50 -0500
commitc4ed70ad4cf233f6091f6de22a5cfaf81ea88747 (patch)
tree0dcaaf83e169d6d7d906675c64464700545ea884 /views/xml/opensearch
parent98acc22fec2dc7942e5c6e5bcdd2e6a356c6e905 (diff)
downloadelgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.gz
elgg-c4ed70ad4cf233f6091f6de22a5cfaf81ea88747.tar.bz2
Elgg 1.8 version
Diffstat (limited to 'views/xml/opensearch')
-rw-r--r--views/xml/opensearch/description.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/views/xml/opensearch/description.php b/views/xml/opensearch/description.php
index 221cb768e..78aadc699 100644
--- a/views/xml/opensearch/description.php
+++ b/views/xml/opensearch/description.php
@@ -5,23 +5,25 @@
*/
// reset cache headers because IE8 is stupid
-header('Pragma: public', TRUE);
-header('Cache-Control: public', TRUE);
+header('Pragma: public', true);
+header('Cache-Control: public', true);
$config_ini = dirname(dirname(dirname(dirname(__FILE__)))) . '/config.ini';
$config = parse_ini_file($config_ini);
-if ($config == FALSE) {
+if ($config == false) {
elgg_log("Unable to parse OpenSearch config file", 'ERROR');
- return TRUE;
+ return true;
}
extract($config);
-$site = get_entity($CONFIG->site_guid);
+$site = elgg_get_site_entity();
$email = $site->email;
-$rss_url = "{$vars['url']}pg/search/?q={searchTerms}&amp;view=opensearch_rss";
-$html_url = "{$vars['url']}pg/search/?q={searchTerms}";
+$rss_url = elgg_normalize_url('search/?q={searchTerms}&view=opensearch_rss');
+$rss_url = elgg_format_url($rss_url);
+$html_url = elgg_normalize_url('search/?q={searchTerms}');
+$site_url = elgg_get_site_url();
?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
@@ -34,10 +36,10 @@ $html_url = "{$vars['url']}pg/search/?q={searchTerms}";
<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>
+ <Image height="16" width="16" type="image/vnd.microsoft.icon"><?php echo "{$site_url}$ico"; ?></Image>
<?php endif; ?>
<?php if (isset($png)): ?>
- <Image height="64" width="64" type="image/png"><?php echo "{$vars['url']}$png"; ?></Image>
+ <Image height="64" width="64" type="image/png"><?php echo "{$site_url}$png"; ?></Image>
<?php endif; ?>
<?php if (isset($tags)): ?>
<Tags><?php echo $tags; ?></Tags>