X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FDefaultSettings.php;h=35a7329688285bc850c0c241d72049458f85bed5;hb=3d58f903d84426658300d17da5ccd0e1f2557de5;hp=0a3d4adeadc9061fe4aa7a380180ba50b7020968;hpb=8933e49ecd4703163ad59eae501a96c4ed93f653;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0a3d4adead..35a7329688 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -660,6 +660,40 @@ $wgMediaHandlers = array( 'image/x-djvu' => 'DjVuHandler', // compat ); +/** + * Plugins for page content model handling. + * Each entry in the array maps a model id to a class name + */ +$wgContentHandlers = array( + CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler', // the usual case + CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler', // dumb version, no syntax highlighting + CONTENT_MODEL_CSS => 'CssContentHandler', // dumb version, no syntax highlighting + CONTENT_MODEL_TEXT => 'TextContentHandler', // dumb plain text in
+);
+
+/**
+ * Mime types for content formats.
+ * Each entry in the array maps a content format to a mime type.
+ *
+ * Extensions that define their own content formats can register
+ * the appropriate mime types in this array.
+ *
+ * Such extensions shall use content format IDs
+ * larger than 100 and register the ids they use at
+ * 
+ * to avoid conflicts with other extensions.
+ */
+$wgContentFormatMimeTypes = array(
+	CONTENT_FORMAT_WIKITEXT => 'text/x-wiki',
+	CONTENT_FORMAT_JAVASCRIPT => 'text/javascript',
+	CONTENT_FORMAT_CSS => 'text/css',
+	CONTENT_FORMAT_TEXT => 'text/plain',
+	CONTENT_FORMAT_HTML => 'text/html',
+	CONTENT_FORMAT_XML => 'application/xml',
+	CONTENT_FORMAT_JSON => 'application/json',
+	CONTENT_FORMAT_SERIALIZED => 'application/vnd.php.serialized',
+);
+
 /**
  * Resizing can be done using PHP's internal image libraries or using
  * ImageMagick or another third-party converter, e.g. GraphicMagick.
@@ -3459,12 +3493,19 @@ $wgSysopEmailBans = true;
  * Limits on the possible sizes of range blocks.
  *
  * CIDR notation is hard to understand, it's easy to mistakenly assume that a
- * /1 is a small range and a /31 is a large range. Setting this to half the
- * number of bits avoids such errors for IPv4.
+ * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
+ * half the number of bits avoids such errors, and allows entire ISPs to be
+ * blocked using a small number of range blocks.
+ *
+ * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
+ * customer, so range blocks larger than /64 (half the number of bits) will
+ * plainly be required. RFC 4692 implies that a very large ISP may be
+ * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
+ * as our limit. As of 2012, blocking the whole world would require a /4 range.
  */
 $wgBlockCIDRLimit = array(
 	'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
-	'IPv6' => 32, # Blocks larger than a /32 (~7.9x10^28 addresses) will not be allowed
+	'IPv6' => 19,
 );
 
 /**
@@ -5853,6 +5894,31 @@ $wgSeleniumConfigFile = null;
 $wgDBtestuser = ''; //db user that has permission to create and drop the test databases only
 $wgDBtestpassword = '';
 
+/**
+ * Associative array mapping namespace IDs to the name of the content model pages in that namespace should have by
+ * default (use the CONTENT_MODEL_XXX constants). If no special content type is defined for a given namespace,
+ * pages in that namespace will  use the CONTENT_MODEL_WIKITEXT (except for the special case of JS and CS pages).
+ */
+$wgNamespaceContentModels = array();
+
+/**
+ * How to react if a plain text version of a non-text Content object is requested using ContentHandler::getContentText():
+ *
+ * * 'ignore': return null
+ * * 'fail': throw an MWException
+ * * 'serializeContent': serializeContent to default format
+ */
+$wgContentHandlerTextFallback = 'ignore';
+
+/**
+ * Compatibility switch for running ContentHandler code withoput a schema update.
+ * Set to false to disable use of the database fields introduced by the ContentHandler facility.
+ *
+ * @deprecated this is only here to allow code deployment without a database schema update on large sites.
+ *             get rid of it in the next version.
+ */
+$wgContentHandlerUseDB = true;
+
 /**
  * For really cool vim folding this needs to be at the end:
  * vim: foldmarker=@{,@} foldmethod=marker