Changes for page Database Search

Last modified by Frank Fock on 2025/04/04 21:13

From version 3.1
edited by Frank Fock
on 2025/04/04 21:13
Change comment: Install extension [org.xwiki.platform:xwiki-platform-search-ui/16.10.4]
To version 1.1
edited by Frank Fock
on 2024/02/07 14:48
Change comment: Install extension [org.xwiki.platform:xwiki-platform-search-ui/15.10.5]

Summary

Details

Page properties
Content
... ... @@ -63,10 +63,7 @@
63 63  {{velocity}}
64 64  #set ($rssMode = $xcontext.action == 'get' || "$!request.xpage" == 'plain')
65 65  #if (!$rssMode)
66 - #set ($discard = $xwiki.linkx.use($services.webjars.url(
67 - 'org.xwiki.platform:xwiki-platform-search-webjar',
68 - 'search.min.css',
69 - {'evaluate': true}), {'type': 'text/css', 'rel': 'stylesheet'}))
66 + #set ($discard = $xwiki.ssfx.use('uicomponents/search/search.css', true))
70 70   ## Disable the document extra data: comments, attachments, history...
71 71   #set ($displayDocExtra = false)
72 72   #databaseSearchForm
... ... @@ -86,7 +86,20 @@
86 86   #set ($discard = $feed.setLanguage("$xcontext.locale"))
87 87   #set ($discard = $feed.setCopyright($xwiki.getXWikiPreference('copyright')))
88 88   #set ($feedOutput = $xwiki.feed.getFeedOutput($feed, $xwiki.getXWikiPreference('feed_type', 'rss_2.0')))
89 - #rawResponse($feedOutput, 'application/rss+xml')
86 +
87 + #set ($discard = $response.setContentType('application/rss+xml'))
88 + #set ($characterEncoding = 'utf-8')
89 + ## Make sure the Character Encoding response header matches the character encoding used to write the response and
90 + ## compute its length.
91 + #set ($discard = $response.setCharacterEncoding($characterEncoding))
92 + ## We write the output directly to the response to avoid the execution of the Rendering Transformations.
93 + #set ($discard = $response.writer.print($feedOutput))
94 + ## The content length is measured in bytes and one character can use more than one byte.
95 + #set ($discard = $response.setContentLength($feedOutput.getBytes($characterEncoding).size()))
96 + ## Make sure the entire content is send back to the client.
97 + #set ($discard = $response.flushBuffer())
98 + ## Make sure XWiki doesn't write any more content to the response.
99 + #set ($discard = $xcontext.setFinished(true))
90 90   #else
91 91   {{include reference="XWiki.Results"/}}
92 92