Provide some default $wgRateLimits values
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index 95baa56..88f7c18 100644 (file)
@@ -168,7 +168,7 @@ $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
  * This variable was provided to support those providers.
  *
  * @since 1.11
- * @deprecated since 1.25; support for '.php5' is being phased out of MediaWiki
+ * @deprecated since 1.25; support for '.php5' has been phased out of MediaWiki
  *  proper. Backward-compatibility can be maintained by configuring your web
  *  server to rewrite URLs. See RELEASE-NOTES for details.
  */
@@ -197,14 +197,14 @@ $wgScriptExtension = '.php';
 /**
  * The URL path to index.php.
  *
- * Defaults to "{$wgScriptPath}/index{$wgScriptExtension}".
+ * Defaults to "{$wgScriptPath}/index.php".
  */
 $wgScript = false;
 
 /**
  * The URL path to load.php.
  *
- * Defaults to "{$wgScriptPath}/load{$wgScriptExtension}".
+ * Defaults to "{$wgScriptPath}/load.php".
  * @since 1.17
  */
 $wgLoadScript = false;
@@ -484,7 +484,7 @@ $wgImgAuthUrlPathMap = array();
  *   - scriptDirUrl      URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
  *                       https://en.wikipedia.org/w
  *   - scriptExtension   Script extension of the MediaWiki installation, equivalent to
- *                       $wgScriptExtension, e.g. .php5 defaults to .php
+ *                       $wgScriptExtension, e.g. ".php5". Defaults to ".php".
  *
  *   - articleUrl        Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
  *   - fetchDescription  Fetch the text of the remote file description page. Equivalent to
@@ -526,9 +526,12 @@ $wgForeignFileRepos = array();
 $wgUseInstantCommons = false;
 
 /**
- * Array of foreign file repos (set in $wgForeignFileRepos above) that
+ * Array of foreign file repo names (set in $wgForeignFileRepos above) that
  * are allowable upload targets. These wikis must have some method of
  * authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.
+ *
+ * Example:
+ * $wgForeignUploadTargets = array( 'shared' );
  */
 $wgForeignUploadTargets = array();
 
@@ -717,6 +720,14 @@ $wgCopyUploadAsyncTimeout = false;
  */
 $wgMaxUploadSize = 1024 * 1024 * 100; # 100MB
 
+/**
+ * Minimum upload chunk size, in bytes. When using chunked upload, non-final
+ * chunks smaller than this will be rejected. May be reduced based on the
+ * 'upload_max_filesize' or 'post_max_size' PHP settings.
+ * @since 1.26
+ */
+$wgMinUploadChunkSize = 1024; # 1KB
+
 /**
  * Point the upload navigation link to an external URL
  * Useful if you want to use a shared repository by default
@@ -744,7 +755,7 @@ $wgUploadMissingFileUrl = false;
  *
  * @par Example:
  * @code
- *   $wgThumbnailScriptPath = "{$wgScriptPath}/thumb{$wgScriptExtension}";
+ *   $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
  * @endcode
  */
 $wgThumbnailScriptPath = false;
@@ -2541,13 +2552,15 @@ $wgUseSquid = false;
 $wgUseESI = false;
 
 /**
- * Send X-Vary-Options header for better caching (requires patched Squid)
+ * Send the Key HTTP header for better caching.
+ * See https://datatracker.ietf.org/doc/draft-fielding-http-key/ for details.
+ * @since 1.27
  */
-$wgUseXVO = false;
+$wgUseKeyHeader = false;
 
 /**
- * Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API
- * requests and RSS/Atom feeds. Use this if you have an SSL termination setup
+ * Add X-Forwarded-Proto to the Vary and Key headers for API requests and
+ * RSS/Atom feeds. Use this if you have an SSL termination setup
  * and need to split the cache between HTTP and HTTPS for API requests,
  * feed requests and HTTP redirect responses in order to prevent cache
  * pollution. This does not affect 'normal' requests to index.php other than
@@ -2606,11 +2619,6 @@ $wgSquidServers = array();
  */
 $wgSquidServersNoPurge = array();
 
-/**
- * Maximum number of titles to purge in any one client operation
- */
-$wgMaxSquidPurgeTitles = 400;
-
 /**
  * Whether to use a Host header in purge requests sent to the proxy servers
  * configured in $wgSquidServers. Set this to false to support Squid
@@ -3357,10 +3365,11 @@ $wgEdititis = false;
 $wgSend404Code = true;
 
 /**
- * The $wgShowRollbackEditCount variable is used to show how many edits will be
- * rollback. The numeric value of the variable are the limit up to are counted.
- * If the value is false or 0, the edits are not counted. Disabling this will
- * furthermore prevent MediaWiki from hiding some useless rollback links.
+ * The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.
+ * The numeric value of the variable controls how many edits MediaWiki will look back to
+ * determine whether a rollback is allowed (by checking that they are all from the same author).
+ * If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki
+ * from hiding some useless rollback links.
  *
  * @since 1.20
  */
@@ -4534,6 +4543,7 @@ $wgDefaultUserOptions = array(
        'gender' => 'unknown',
        'hideminor' => 0,
        'hidepatrolled' => 0,
+       'hidecategorization' => 1,
        'imagesize' => 2,
        'math' => 1,
        'minordefault' => 0,
@@ -4565,6 +4575,7 @@ $wgDefaultUserOptions = array(
        'watchlisthideminor' => 0,
        'watchlisthideown' => 0,
        'watchlisthidepatrolled' => 0,
+       'watchlisthidecategorization' => 1,
        'watchmoves' => 0,
        'watchrollback' => 0,
        'wllimit' => 250,
@@ -5191,74 +5202,85 @@ $wgApplyIpBlocksToXff = false;
  * @par Example:
  * To set a generic maximum of 4 hits in 60 seconds:
  * @code
- * $wgRateLimits = array( 4, 60 );
+ *     $wgRateLimits = array( 4, 60 );
  * @endcode
  *
- * You could also limit per action and then type of users. See the inline
- * code for a template to use.
- *
- * This option set is experimental and likely to change.
+ * @par Example:
+ * You could also limit per action and then type of users.
+ * @code
+ *     $wgRateLimits = array(
+ *         'edit' => array(
+ *             'anon' => array( x, y ), // any and all anonymous edits (aggregate)
+ *             'user' => array( x, y ), // each logged-in user
+ *             'newbie' => array( x, y ), // each new autoconfirmed accounts; overrides 'user'
+ *             'ip' => array( x, y ), // each anon and recent account
+ *             'subnet' => array( x, y ), // ... within a /24 subnet in IPv4 or /64 in IPv6
+ *         )
+ *     )
+ * @endcode
  *
- * @warning Requires memcached.
+ * @warning Requires that $wgMainCacheType is set to something persistent
  */
 $wgRateLimits = array(
+       // Page edits
        'edit' => array(
-               'anon' => null, // for any and all anonymous edits (aggregate)
-               'user' => null, // for each logged-in user
-               'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
-               'ip' => null, // for each anon and recent account
-               'subnet' => null, // ... within a /24 subnet in IPv4 or /64 in IPv6
+               'ip' => array( 8, 60 ),
+               'newbie' => array( 8, 60 ),
        ),
+       // Page moves
        'move' => array(
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+               'newbie' => array( 2, 120 ),
+               'user' => array( 8, 60 ),
        ),
-       'mailpassword' => array( // triggering password resets emails
-               'anon' => null,
+       // File uploads
+       'upload' => array(
+               'ip' => array( 8, 60 ),
+               'newbie' => array( 8, 60 ),
        ),
-       'emailuser' => array( // emailing other users using MediaWiki
-               'user' => null,
+       // Page rollbacks
+       'rollback' => array(
+               'user' => array( 10, 60 ),
+               'newbie' => array( 5, 120 )
        ),
-       'linkpurge' => array( // purges of link tables
-               'anon' => null,
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+       // Triggering password resets emails
+       'mailpassword' => array(
+               'ip' => array( 5, 3600 ),
        ),
-       'renderfile' => array( // files rendered via thumb.php or thumb_handler.php
-               'anon' => null,
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+       // Emailing other users using MediaWiki
+       'emailuser' => array(
+               'ip' => array( 5, 86400 ),
+               'newbie' => array( 5, 86400 ),
+               'user' => array( 20, 86400 ),
        ),
-       'renderfile-nonstandard' => array( // same as above but for non-standard thumbnails
-               'anon' => null,
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+       // Purging pages
+       'purge' => array(
+               'ip' => array( 30, 60 ),
+               'user' => array( 30, 60 ),
        ),
-       'stashedit' => array( // stashing edits into cache before save
-               'anon' => null,
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+       // Purges of link tables
+       'linkpurge' => array(
+               'ip' => array( 30, 60 ),
+               'user' => array( 30, 60 ),
        ),
-       'changetag' => array( // adding or removing change tags
-               'user' => null,
-               'newbie' => null,
+       // Files rendered via thumb.php or thumb_handler.php
+       'renderfile' => array(
+               'ip' => array( 700, 30 ),
+               'user' => array( 700, 30 ),
        ),
-       'purge' => array( // purging pages
-               'anon' => null,
-               'user' => null,
-               'newbie' => null,
-               'ip' => null,
-               'subnet' => null,
+       // Same as above but for non-standard thumbnails
+       'renderfile-nonstandard' => array(
+               'ip' => array( 70, 30 ),
+               'user' => array( 70, 30 ),
+       ),
+       // Stashing edits into cache before save
+       'stashedit' => array(
+               'ip' => array( 30, 60 ),
+               'newbie' => array( 30, 60 ),
+       ),
+       // Adding or removing change tags
+       'changetag' => array(
+               'ip' => array( 8, 60 ),
+               'newbie' => array( 8, 60 ),
        ),
 );
 
@@ -6164,6 +6186,12 @@ $wgRCEngines = array(
        'udp' => 'UDPRCFeedEngine',
 );
 
+/**
+ * Treat category membership changes as a RecentChange
+ * @since 1.27
+ */
+$wgRCWatchCategoryMembership = false;
+
 /**
  * Use RC Patrolling to check for vandalism
  */
@@ -7327,12 +7355,6 @@ $wgUseAjax = true;
  */
 $wgAjaxExportList = array();
 
-/**
- * Enable watching/unwatching pages using AJAX.
- * Requires $wgUseAjax to be true too.
- */
-$wgAjaxWatch = true;
-
 /**
  * Enable AJAX check for file overwrite, pre-upload
  */