]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Fixes #176 - Add opensearch functionality
[github/shaarli/Shaarli.git] / index.php
old mode 100755 (executable)
new mode 100644 (file)
index b06dd50..0181694
--- 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']))
     {