X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=opensearch_desc.php;h=bd3281aa9c6c3ba4d6d0c715dd79de5e15e38f9b;hb=36d9784b156ea4d906b73c8ae30f8ae2513e9a86;hp=92c182d8a70e2a2f993ef61cb7202a46e9008555;hpb=61898ad28ed69c5b391eb43e0db9386279b9612c;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 ); }