From 8f8113b94beb46f5deb84e393a95237f59969bbb Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 13 Nov 2015 19:32:35 +0100 Subject: Fixes #176 - Add opensearch functionality * add a new page in Router: do=opensearch which displays the opensearch plugin * using base64 compressed image to avoid issue encountered with HTTPS --- index.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index b06dd50c..01816947 100644 --- a/index.php +++ b/index.php @@ -1204,6 +1204,14 @@ function renderPage() exit; } + // Display openseach plugin (XML) + if ($targetPage == Router::$PAGE_OPENSEARCH) { + header('Content-Type: application/xml; charset=utf-8'); + $PAGE->assign('serverurl', index_url($_SERVER)); + $PAGE->renderPage('opensearch'); + exit; + } + // -------- User clicks on a tag in a link: The tag is added to the list of searched tags (searchtags=...) if (isset($_GET['addtag'])) { -- cgit v1.2.3