Declare LogFormatter::$parsedParameters property
[lhc/web/wiklou.git] / opensearch_desc.php
index bef1688..b9b2161 100644 (file)
  * @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 );
        }