X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=opensearch_desc.php;h=bd3281aa9c6c3ba4d6d0c715dd79de5e15e38f9b;hb=518ddd8121a9c46a35ebd18aff40d84787da166f;hp=92c182d8a70e2a2f993ef61cb7202a46e9008555;hpb=f4070a55263311f2f6e1d3a50391ee1aff97d236;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 ); }