X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=opensearch_desc.php;h=bd3281aa9c6c3ba4d6d0c715dd79de5e15e38f9b;hb=d66d388caad4cbe7ff5926d44398ee394961f644;hp=92c182d8a70e2a2f993ef61cb7202a46e9008555;hpb=7d593c2186fc0066c35979788f27e7c4e1be3a2a;p=lhc%2Fweb%2Fwiklou.git diff --git a/opensearch_desc.php b/opensearch_desc.php index 92c182d8a7..bd3281aa9c 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -21,9 +21,8 @@ */ // This endpoint is supposed to be independent of request cookies and other -// details of the session. Log warnings for violations of the no-session -// constraint. -define( 'MW_NO_SESSION', 'warn' ); +// details of the session. Enforce this constraint with respect to session use. +define( 'MW_NO_SESSION', 1 ); require_once __DIR__ . '/includes/WebStart.php'; @@ -85,7 +84,7 @@ $urls[] = [ 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ]; foreach ( $wgOpenSearchTemplates as $type => $template ) { - if ( !$template && $wgEnableAPI ) { + if ( !$template ) { $template = ApiOpenSearch::getOpenSearchTemplate( $type ); }