X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=opensearch_desc.php;h=bd3281aa9c6c3ba4d6d0c715dd79de5e15e38f9b;hb=f84457f8bd14618da7c7503991ff8d6a96536c61;hp=bef168878f1df4fc3517abe347d22de53af625e0;hpb=f9d7d3b8561dab3ddfd8798a77a5b72e03ac8c2b;p=lhc%2Fweb%2Fwiklou.git diff --git a/opensearch_desc.php b/opensearch_desc.php index bef168878f..bd3281aa9c 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -20,6 +20,10 @@ * @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' ) { @@ -80,7 +84,7 @@ $urls[] = [ 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ]; foreach ( $wgOpenSearchTemplates as $type => $template ) { - if ( !$template && $wgEnableAPI ) { + if ( !$template ) { $template = ApiOpenSearch::getOpenSearchTemplate( $type ); }