dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SearchEngine: Hard deprecate unused static methods deprecated in 1.27
[lhc/web/wiklou.git]
/
opensearch_desc.php
diff --git
a/opensearch_desc.php
b/opensearch_desc.php
index
bef1688
..
bd3281a
100644
(file)
--- a/
opensearch_desc.php
+++ b/
opensearch_desc.php
@@
-20,6
+20,10
@@
* @file
*/
* @file
*/
+// This endpoint is supposed to be independent of request cookies and other
+// details of the session. Enforce this constraint with respect to session use.
+define( 'MW_NO_SESSION', 1 );
+
require_once __DIR__ . '/includes/WebStart.php';
if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) {
require_once __DIR__ . '/includes/WebStart.php';
if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) {
@@
-80,7
+84,7
@@
$urls[] = [
'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ];
foreach ( $wgOpenSearchTemplates as $type => $template ) {
'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ];
foreach ( $wgOpenSearchTemplates as $type => $template ) {
- if ( !$template
&& $wgEnableAPI
) {
+ if ( !$template ) {
$template = ApiOpenSearch::getOpenSearchTemplate( $type );
}
$template = ApiOpenSearch::getOpenSearchTemplate( $type );
}