X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=blobdiff_plain;f=includes%2FDefaultSettings.php;h=664718a488d4de6c5e9460261cd41acd798930df;hb=00ac2882bbfa81c226250efc06586a5ab50bf3f8;hp=4e08aa62b363c33be90d3e3a328c7b68f2890de5;hpb=9928270c326da653c7d3c5655858f31c9ef2dd01;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 4e08aa62b3..664718a488 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -685,7 +685,7 @@ $wgUseSharedUploads = false; /** * Full path on the web server where shared uploads can be found */ -$wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"; +$wgSharedUploadPath = null; /** * Fetch commons image description pages and display them on the local wiki? @@ -695,7 +695,7 @@ $wgFetchCommonsDescriptions = false; /** * Path on the file system where shared uploads can be found. */ -$wgSharedUploadDirectory = "/var/www/wiki3/images"; +$wgSharedUploadDirectory = null; /** * DB name with metadata about shared directory. @@ -1895,7 +1895,7 @@ $wgSharedSchema = false; * - password: DB password * - type: DB type * - * - load: Ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0. + * - load: Ratio of DB_REPLICA load, must be >=0, the sum of all loads must be >0. * If this is zero for any given server, no normal query traffic will be * sent to it. It will be excluded from lag checks in maintenance scripts. * The only way it can receive traffic is if groupLoads is used. @@ -1904,7 +1904,7 @@ $wgSharedSchema = false; * to several groups, the most specific group defined here is used. * * - flags: bit field - * - DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended) + * - DBO_DEFAULT -- turns on DBO_TRX only if "cliMode" is off (recommended) * - DBO_DEBUG -- equivalent of $wgDebugDumpSql * - DBO_TRX -- wrap entire request in a transaction * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php) @@ -1913,8 +1913,11 @@ $wgSharedSchema = false; * - DBO_COMPRESS -- uses internal compression in database connections, * if available * - * - max lag: (optional) Maximum replication lag before a slave will taken out of rotation + * - max lag: (optional) Maximum replication lag before a replica DB goes out of rotation * - is static: (optional) Set to true if the dataset is static and no replication is used. + * - cliMode: (optional) Connection handles will not assume that requests are short-lived + * nor that INSERT..SELECT can be rewritten into a buffered SELECT and INSERT. + * [Default: uses value of $wgCommandLineMode] * * These and any other user-defined properties will be assigned to the mLBInfo member * variable of the Database object. @@ -1924,15 +1927,15 @@ $wgSharedSchema = false; * perhaps in some command-line scripts). * * The first server listed in this array (with key 0) will be the master. The - * rest of the servers will be slaves. To prevent writes to your slaves due to + * rest of the servers will be replica DBs. To prevent writes to your replica DBs due to * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your - * slaves in my.cnf. You can set read_only mode at runtime using: + * replica DBs in my.cnf. You can set read_only mode at runtime using: * * @code * SET @@read_only=1; * @endcode * - * Since the effect of writing to a slave is so damaging and difficult to clean + * Since the effect of writing to a replica DB is so damaging and difficult to clean * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even * our masters, and then set read_only=0 on masters at runtime. */ @@ -2278,7 +2281,8 @@ $wgObjectCaches = [ 'class' => 'SqlBagOStuff', 'args' => [ [ 'slaveOnly' => false ] ] ], - 'loggroup' => 'SQLBagOStuff' + 'loggroup' => 'SQLBagOStuff', + 'reportDupes' => false ], 'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ], @@ -2657,7 +2661,7 @@ $wgInternalServer = false; $wgSquidMaxage = 18000; /** - * Cache timeout for the CDN when DB slave lag is high + * Cache timeout for the CDN when DB replica DB lag is high * @see $wgSquidMaxage * @since 1.27 */ @@ -2667,7 +2671,7 @@ $wgCdnMaxageLagged = 30; * If set, any SquidPurge call on a URL or URLs will send a second purge no less than * this many seconds later via the job queue. This requires delayed job support. * This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that - * slave lag does not cause page to be stuck in stales states in CDN. + * replica DB lag does not cause page to be stuck in stales states in CDN. * * This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki). * If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL, @@ -3193,6 +3197,15 @@ $wgHTMLFormAllowTableFormat = true; */ $wgUseMediaWikiUIEverywhere = false; +/** + * Whether to label the store-to-database-and-show-to-others button in the editor + * as "Save page"/"Save changes" if false (the default) or, if true, instead as + * "Publish page"/"Publish changes". + * + * @since 1.28 + */ +$wgEditSubmitButtonLabelPublish = false; + /** * Permit other namespaces in addition to the w3.org default. * @@ -3747,10 +3760,8 @@ $wgResourceLoaderLESSImportPaths = [ /** * Whether ResourceLoader should attempt to persist modules in localStorage on * browsers that support the Web Storage API. - * - * @since 1.23 - Client-side module persistence is experimental. Exercise care. */ -$wgResourceLoaderStorageEnabled = false; +$wgResourceLoaderStorageEnabled = true; /** * Cache version for client-side ResourceLoader module storage. You can trigger @@ -6152,6 +6163,14 @@ $wgStatsdServer = false; */ $wgStatsdMetricPrefix = 'MediaWiki'; +/** + * Sampling rate for statsd metrics as an associative array of patterns and rates. + * Patterns are Unix shell patterns (e.g. 'MediaWiki.api.*'). + * Rates are sampling probabilities (e.g. 0.1 means 1 in 10 events are sampled). + * @since 1.28 + */ +$wgStatsdSamplingRates = []; + /** * InfoAction retrieves a list of transclusion links (both to and from). * This number puts a limit on that query in the case of highly transcluded @@ -7201,8 +7220,8 @@ $wgJobTypesExcludedFromDefaultQueue = [ 'AssembleUploadChunks', 'PublishStashedF $wgJobBackoffThrottling = []; /** - * 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. + * Make job runners commit changes for replica DB-lag prone jobs one job at a time. + * This is useful if there are many job workers that race on replica DB 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 @@ -7824,7 +7843,7 @@ $wgAPIMaxResultSize = 8388608; $wgAPIMaxUncachedDiffs = 1; /** - * Maximum amount of DB lag on a majority of DB slaves to tolerate + * Maximum amount of DB lag on a majority of DB replica DBs to tolerate * before forcing bots to retry any write requests via API errors. * This should be lower than the 'max lag' value in $wgLBFactoryConf. */ @@ -8033,9 +8052,13 @@ $wgJobRunRate = 1; * When $wgJobRunRate > 0, try to run jobs asynchronously, spawning a new process * to handle the job execution, instead of blocking the request until the job * execution finishes. + * * @since 1.23 */ -$wgRunJobsAsync = true; +$wgRunJobsAsync = ( + !function_exists( 'register_postsend_function' ) && + !function_exists( 'fastcgi_finish_request' ) +); /** * Number of rows to update per job @@ -8250,11 +8273,29 @@ $wgPageLanguageUseDB = false; /** * Global configuration variable for Virtual REST Services. - * Parameters for different services are to be declared inside - * $wgVirtualRestConfig['modules'], which is to be treated as an associative - * array. Global parameters will be merged with service-specific ones. The - * result will then be passed to VirtualRESTService::__construct() in the - * module. + * + * Use the 'path' key to define automatically mounted services. The value for this + * key is a map of path prefixes to service configuration. The later is an array of: + * - class : the fully qualified class name + * - options : map of arguments to the class constructor + * Such services will be available to handle queries under their path from the VRS + * singleton, e.g. MediaWikiServices::getInstance()->getVirtualRESTServiceClient(); + * + * Auto-mounting example for Parsoid: + * + * $wgVirtualRestConfig['paths']['/parsoid/'] = [ + * 'class' => 'ParsoidVirtualRESTService', + * 'options' => [ + * 'url' => 'http://localhost:8000', + * 'prefix' => 'enwiki', + * 'domain' => 'en.wikipedia.org' + * ] + * ]; + * + * Parameters for different services can also be declared inside the 'modules' value, + * which is to be treated as an associative array. The parameters in 'global' will be + * merged with service-specific ones. The result will then be passed to + * VirtualRESTService::__construct() in the module. * * Example config for Parsoid: * @@ -8268,6 +8309,7 @@ $wgPageLanguageUseDB = false; * @since 1.25 */ $wgVirtualRestConfig = [ + 'paths' => [], 'modules' => [], 'global' => [ # Timeout in seconds @@ -8342,13 +8384,35 @@ $wgEventRelayerConfig = [ * PHP version, and chosen database backend. The Wikimedia Foundation shares this data with * MediaWiki developers to help guide future development efforts. * - * For details about what data is sent, see: https://www.mediawiki.org/wiki/Pingback + * For details about what data is sent, see: https://www.mediawiki.org/wiki/Manual:$wgPingback * * @var bool * @since 1.28 */ $wgPingback = false; +/** + * List of urls which appear often to be triggering CSP reports + * but do not appear to be caused by actual content, but by client + * software inserting scripts (i.e. Ad-Ware). + * List based on results from Wikimedia logs. + * + * @since 1.28 + */ +$wgCSPFalsePositiveUrls = [ + 'https://3hub.co' => true, + 'https://morepro.info' => true, + 'https://p.ato.mx' => true, + 'https://s.ato.mx' => true, + 'https://adserver.adtech.de' => true, + 'https://ums.adtechus.com' => true, + 'https://cas.criteo.com' => true, + 'https://cat.nl.eu.criteo.com' => true, + 'https://atpixel.alephd.com' => true, + 'https://rtb.metrigo.com' => true, + 'https://d5p.de17a.com' => true, +]; + /** * For really cool vim folding this needs to be at the end: * vim: foldmarker=@{,@} foldmethod=marker