+
+if ($site !== null) {
+ $urlNoSite = buildLink('?q=' . urlencode($cleanQuery), $filters, null, null);
+} else {
+ $urlNoSite = null;
+}
+
+$urlSortRelevance = buildLink(
+ str_replace('&sort=date', '', $baseLink), $filters, null, null
+);
+$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';
+}