diff --git a/views/bootstrap/class.OpensearchDesc.php b/views/bootstrap/class.OpensearchDesc.php
index 924733585..edb27b7c7 100644
--- a/views/bootstrap/class.OpensearchDesc.php
+++ b/views/bootstrap/class.OpensearchDesc.php
@@ -44,7 +44,10 @@ class SeedDMS_View_OpensearchDesc extends SeedDMS_Bootstrap_Style {
= $sitename ?>
= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>styles/= $this->theme ?>/favicon.ico
_httpRoot."out/out.Search.php?query={searchTerms}" ?>" />
+ _httpRoot."out/out.Search.php?action=opensearchsuggestion&query={searchTerms}" ?>" />
= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php" ?>
+ UTF-8
+ UTF-8
printClickFolderJs();
} /* }}} */
- function typeahead() { /* {{{ */
+ function opensearchsuggestion() { /* {{{ */
+ $dms = $this->params['dms'];
+ $user = $this->params['user'];
+ $query = $this->params['query'];
+ $entries = $this->params['searchhits'];
+ $recs = array();
+ $content = "\n";
+ $content .= "\n";
+ $content .= "".$query."";
+ if($entries) {
+ $content .= "\n";
+ foreach ($entries as $entry) {
+ $content .= "- \n";
+ if($entry->isType('document')) {
+ $content .= "".$entry->getName()."\n";
+ $content .= "http:".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewDocument.php?documentid=".$entry->getId()."\n";
+ } elseif($entry->isType('folder')) {
+ $content .= "".$entry->getName()."\n";
+ $content .= "http:".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.ViewFolder.php?folderid=".$entry->getId()."\n";
+ }
+ $content .= "
\n";
+ }
+ $content .= "\n";
+ }
+ $content .= "";
+ header("Content-Disposition: attachment; filename=\"search.xml\"; filename*=UTF-8''search.xml");
+ header('Content-Type: application/x-suggestions+xml');
+ echo $content;
+ } /* }}} */
+
+function typeahead() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$query = $this->params['query'];