Merge OpenSearchXml extension into core
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index f93737c..85f25c2 100644 (file)
@@ -3199,6 +3199,8 @@ $wgEnableCanonicalServerLink = false;
  * <cross-domain-policy>. Without this, an attacker can send their own
  * cross-domain policy unless it is prevented by the crossdomain.xml file at
  * the domain root.
+ *
+ * @since 1.25
  */
 $wgMangleFlashPolicy = true;
 
@@ -5526,9 +5528,24 @@ $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
  * PHP wrapper to avoid firing up mediawiki for every keystroke
  *
  * Placeholders: {searchTerms}
+ *
+ * @deprecated since 1.25 Use $wgOpenSearchTemplates['application/x-suggestions+json'] instead
  */
 $wgOpenSearchTemplate = false;
 
+/**
+ * Templates for OpenSearch suggestions, defaults to API action=opensearch
+ *
+ * Sites with heavy load would typically have these point to a custom
+ * PHP wrapper to avoid firing up mediawiki for every keystroke
+ *
+ * Placeholders: {searchTerms}
+ */
+$wgOpenSearchTemplates = array(
+       'application/x-suggestions+json' => false,
+       'application/x-suggestions+xml' => false,
+);
+
 /**
  * Enable OpenSearch suggestions requested by MediaWiki. Set this to
  * false if you've disabled scripts that use api?action=opensearch and
@@ -5543,6 +5560,11 @@ $wgEnableOpenSearchSuggest = true;
  */
 $wgOpenSearchDefaultLimit = 10;
 
+/**
+ * Minimum length of extract in <Description>. Actual extracts will last until the end of sentence.
+ */
+$wgOpenSearchDescriptionLength = 100;
+
 /**
  * Expiry time for search suggestion responses
  */