wfRunHooks() -> Hooks::run() in maintenance scripts
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index c8197f2..5b7e94a 100644 (file)
@@ -75,7 +75,7 @@ $wgConfigRegistry = array(
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.25alpha';
+$wgVersion = '1.26alpha';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php
@@ -1855,13 +1855,6 @@ $wgDBerrorLog = false;
  */
 $wgDBerrorLogTZ = false;
 
-/**
- * Scale load balancer polling time so that under overload conditions, the
- * database server receives a SHOW STATUS query at an average interval of this
- * many microseconds
- */
-$wgDBAvgStatusPoll = 2000;
-
 /**
  * Set to true to engage MySQL 4.1/5.0 charset-related features;
  * for now will just cause sending of 'SET NAMES=utf8' on connect.
@@ -2068,8 +2061,8 @@ $wgCacheDirectory = false;
 
 /**
  * Main cache type. This should be a cache with fast access, but it may have
- * limited space. By default, it is disabled, since the database is not fast
- * enough to make it worthwhile.
+ * limited space. By default, it is disabled, since the stock database cache
+ * is not fast enough to make it worthwhile.
  *
  * The options are:
  *
@@ -2147,6 +2140,52 @@ $wgObjectCaches = array(
        'hash' => array( 'class' => 'HashBagOStuff' ),
 );
 
+/**
+ * Main cache Wide-Area-Network cache type. This should be a cache with fast access,
+ * but it may have limited space. By default, it is disabled, since the basic stock
+ * cache is not fast enough to make it worthwhile. For single data-center setups, this can
+ * simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches
+ * cache with a relayer of type EventRelayerNull.
+ *
+ * The options are:
+ *   - false:            Configure the cache using $wgMainCacheType, without using
+ *                       a relayer (only matters if there are multiple data-centers)
+ *   - CACHE_NONE:       Do not cache
+ *   - (other):          A string may be used which identifies a cache
+ *                       configuration in $wgWANObjectCaches.
+ */
+$wgMainWANCache = false;
+
+/**
+ * Advanced WAN object cache configuration.
+ *
+ * Each WAN cache wraps a registered object cache (for the local cluster)
+ * and it must also be configured to point to a PubSub instance. Subscribers
+ * must be configured to relay purges to the actual cache servers.
+ *
+ * The format is an associative array where the key is a cache identifier, and
+ * the value is an associative array of parameters. The "cacheId" parameter is
+ * a cache identifier from $wgObjectCaches. The "relayerConfig" parameter is an
+ * array used to construct an EventRelayer object. The "pool" parameter is a
+ * string that is used as a PubSub channel prefix.
+ */
+$wgWANObjectCaches = array(
+       CACHE_NONE => array(
+               'class'         => 'WANObjectCache',
+               'cacheId'       => CACHE_NONE,
+               'pool'          => 'mediawiki-main-none',
+               'relayerConfig' => array( 'class' => 'EventRelayerNull' )
+       )
+       /* Example of a simple single data-center cache:
+       'memcached-php' => array(
+               'class'         => 'WANObjectCache',
+               'cacheId'       => 'memcached-php',
+               'pool'          => 'mediawiki-main-memcached',
+               'relayerConfig' => array( 'class' => 'EventRelayerNull' )
+       )
+       */
+);
+
 /**
  * The expiry time for the parser cache, in seconds.
  * The default is 86400 (one day).
@@ -4304,6 +4343,7 @@ $wgReservedUsernames = array(
        'msg:double-redirect-fixer', // Automatic double redirect fix
        'msg:usermessage-editor', // Default user for leaving user messages
        'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
+       'msg:spambot_username', // Used by cleanupSpam.php
 );
 
 /**
@@ -4563,6 +4603,8 @@ $wgGroupPermissions['user']['reupload-shared'] = true;
 $wgGroupPermissions['user']['minoredit'] = true;
 $wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok"
 $wgGroupPermissions['user']['sendemail'] = true;
+$wgGroupPermissions['user']['applychangetags'] = true;
+$wgGroupPermissions['user']['changetags'] = true;
 
 // Implicit group for accounts that pass $wgAutoConfirmAge
 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
@@ -5043,7 +5085,11 @@ $wgRateLimits = array(
                'newbie' => null,
                'ip' => null,
                'subnet' => null,
-       )
+       ),
+       'changetag' => array( // adding or removing change tags
+               'user' => null,
+               'newbie' => null,
+       ),
 );
 
 /**
@@ -6451,6 +6497,21 @@ $wgJobTypesExcludedFromDefaultQueue = array( 'AssembleUploadChunks', 'PublishSta
  */
 $wgJobBackoffThrottling = array();
 
+/**
+ * Make job runners commit changes for slave-lag prone jobs one job at a time.
+ * This is useful if there are many job workers that race on slave lag checks.
+ * If set, jobs taking this many seconds of DB write time have serialized commits.
+ *
+ * Note that affected jobs may have worse lock contention. Also, if they affect
+ * several DBs at once they may have a smaller chance of being atomic due to the
+ * possibility of connection loss while queueing up to commit. Affected jobs may
+ * also fail due to the commit lock acquisition timeout.
+ *
+ * @var float|bool
+ * @since 1.26
+ */
+$wgJobSerialCommitThreshold = false;
+
 /**
  * Map of job types to configuration arrays.
  * This determines which queue class and storage system is used for each job type.
@@ -6474,8 +6535,7 @@ $wgJobQueueAggregator = array(
  * Expensive Querypages are already updated.
  */
 $wgSpecialPageCacheUpdates = array(
-       'Statistics' => array( 'SiteStatsUpdate', 'cacheUpdate' ),
-       'Activeusers' => array( 'SpecialActiveUsers', 'cacheUpdate' ),
+       'Statistics' => array( 'SiteStatsUpdate', 'cacheUpdate' )
 );
 
 /**
@@ -6573,6 +6633,7 @@ $wgLogTypes = array(
        'patrol',
        'merge',
        'suppress',
+       'tag',
        'managetags',
 );
 
@@ -6610,7 +6671,8 @@ $wgLogRestrictions = array(
  * for the link text.
  */
 $wgFilterLogTypes = array(
-       'patrol' => true
+       'patrol' => true,
+       'tag' => true,
 );
 
 /**
@@ -6673,7 +6735,7 @@ $wgLogActions = array(
 );
 
 /**
- * The same as above, but here values are names of functions,
+ * The same as above, but here values are names of classes,
  * not messages.
  * @see LogPage::actionText
  * @see LogFormatter
@@ -6691,10 +6753,11 @@ $wgLogActionsHandlers = array(
        'patrol/patrol' => 'PatrolLogFormatter',
        'rights/rights' => 'RightsLogFormatter',
        'rights/autopromote' => 'RightsLogFormatter',
-       'upload/upload' => 'LogFormatter',
-       'upload/overwrite' => 'LogFormatter',
-       'upload/revert' => 'LogFormatter',
+       'upload/upload' => 'UploadLogFormatter',
+       'upload/overwrite' => 'UploadLogFormatter',
+       'upload/revert' => 'UploadLogFormatter',
        'merge/merge' => 'MergeLogFormatter',
+       'tag/update' => 'TagLogFormatter',
        'managetags/create' => 'LogFormatter',
        'managetags/delete' => 'LogFormatter',
        'managetags/activate' => 'LogFormatter',
@@ -6772,6 +6835,7 @@ $wgActions = array(
        'credits' => true,
        'delete' => true,
        'edit' => true,
+       'editchangetags' => 'SpecialPageAction',
        'history' => true,
        'info' => true,
        'markpatrolled' => true,
@@ -6780,7 +6844,7 @@ $wgActions = array(
        'raw' => true,
        'render' => true,
        'revert' => true,
-       'revisiondelete' => true,
+       'revisiondelete' => 'SpecialPageAction',
        'rollback' => true,
        'submit' => true,
        'unprotect' => true,