aboutsummaryrefslogtreecommitdiff
path: root/www/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/index.php')
-rw-r--r--www/index.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/www/index.php b/www/index.php
index 54d5da8..dbdcfd2 100644
--- a/www/index.php
+++ b/www/index.php
@@ -137,11 +137,20 @@ $urlSortRelevance = buildLink(
);
$urlSortDate = $urlSortRelevance . '&sort=date';
+if (isset($_GET['format']) && $_GET['format'] == 'opensearch') {
+ $template = 'opensearch';
+ $baseLink .= '&format=opensearch';
+ header('Content-type: application/atom+xml');
+} else {
+ $template = 'search';
+}
+
render(
- 'search',
+ $template,
array(
'queryTime' => round($timeEnd - $timeBegin, 2) . 's',
'query' => $query,
+ 'fullUrl' => Helper::fullUrl($baseLink),
'cleanQuery' => $cleanQuery,
'urlNoSite' => $urlNoSite,
'site' => $site,