X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=blobdiff_plain;f=opensearch_desc.php;h=b9b21611d0279cb5faafb760c9c616a6d503e8d0;hb=f87db68a3e7495aa791ad7c666300882523de54a;hp=bef168878f1df4fc3517abe347d22de53af625e0;hpb=fc1ca75323b5f424a9f8d28d42d85a311ed2f721;p=lhc%2Fweb%2Fwiklou.git diff --git a/opensearch_desc.php b/opensearch_desc.php index bef168878f..b9b21611d0 100644 --- a/opensearch_desc.php +++ b/opensearch_desc.php @@ -20,6 +20,11 @@ * @file */ +// 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' ); + require_once __DIR__ . '/includes/WebStart.php'; if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) { @@ -80,7 +85,7 @@ $urls[] = [ 'template' => $searchPage->getCanonicalURL( 'search={searchTerms}' ) ]; foreach ( $wgOpenSearchTemplates as $type => $template ) { - if ( !$template && $wgEnableAPI ) { + if ( !$template ) { $template = ApiOpenSearch::getOpenSearchTemplate( $type ); }