Merge "Revert "textSelection: Use execcommand to replace text""
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index fa95633..0acce58 100644 (file)
@@ -37,6 +37,7 @@
  *
  * @file
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * @cond file_level_code
@@ -1225,6 +1226,16 @@ $wgSVGMetadataCutoff = 262144;
  */
 $wgAllowTitlesInSVG = false;
 
+/**
+ * Whether thumbnails should be generated in target language (usually, same as
+ * page language), if available.
+ * Currently, applies only to SVG images that use the systemLanguage attribute
+ * to specify text language.
+ *
+ * @since 1.33
+ */
+$wgMediaInTargetLanguage = false;
+
 /**
  * The maximum number of pixels a source image can have if it is to be scaled
  * down by a scaler that requires the full source image to be decompressed
@@ -1857,7 +1868,7 @@ $wgDBserver = 'localhost';
 $wgDBport = 5432;
 
 /**
- * Name of the database
+ * Name of the database; this should be alphanumeric and not contain spaces nor hyphens
  */
 $wgDBname = 'my_wiki';
 
@@ -1924,7 +1935,7 @@ $wgSearchType = null;
 $wgSearchTypeAlternatives = null;
 
 /**
- * Table name prefix
+ * Table name prefix; this should be alphanumeric and not contain spaces nor hyphens
  */
 $wgDBprefix = '';
 
@@ -1942,7 +1953,7 @@ $wgDBTableOptions = 'ENGINE=InnoDB, DEFAULT CHARSET=binary';
 $wgSQLMode = '';
 
 /**
- * Mediawiki schema
+ * Mediawiki schema; this should be alphanumeric and not contain spaces nor hyphens
  */
 $wgDBmwschema = null;
 
@@ -2154,7 +2165,15 @@ $wgDBOracleDRCP = false;
 /**
  * Other wikis on this site, can be administered from a single developer account.
  *
- * Array numeric key => database name
+ * @var string[] List of wiki DB domain IDs; the format of each ID consist of 1-3 hyphen
+ *   delimited alphanumeric components (each with no hyphens nor spaces) of any of the forms:
+ *   - "<DB NAME>-<DB SCHEMA>-<TABLE PREFIX>"
+ *   - "<DB NAME>-<TABLE PREFIX>"
+ *   - "<DB NAME>"
+ * If hyphens appear in any of the components, then the domain ID parsing may not work
+ * in all cases and site functionality might be affected. If the schema ($wgDBmwschema)
+ * is left to the default "mediawiki" for all wikis, then the schema should be omitted
+ * from these IDs.
  */
 $wgLocalDatabases = [];
 
@@ -2999,8 +3018,11 @@ $wgExtraLanguageNames = [];
  * @since 1.29
  */
 $wgExtraLanguageCodes = [
+       // Language codes of macro languages, which get mapped to the main language
        'bh' => 'bho', // Bihari language family
        'no' => 'nb', // Norwegian language family
+
+       // Language variants which get mapped to the main language
        'simple' => 'en', // Simple English
 ];
 
@@ -3019,6 +3041,8 @@ $wgDummyLanguageCodes = [];
  *
  * Note that pages with titles containing presentation forms will become
  * inaccessible, run maintenance/cleanupTitles.php to fix this.
+ *
+ * @deprecated since 1.33: in the future will always be true.
  */
 $wgFixArabicUnicode = true;
 
@@ -3030,6 +3054,8 @@ $wgFixArabicUnicode = true;
  *
  * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
  * fix any ZWJ sequences in existing page titles.
+ *
+ * @deprecated since 1.33: in the future will always be true.
  */
 $wgFixMalayalamUnicode = true;
 
@@ -4238,8 +4264,10 @@ $wgAllowExternalImagesFrom = '';
  *
  * Set this to true to enable the on-wiki whitelist (MediaWiki:External image whitelist)
  * Or false to disable it
+ *
+ * @since 1.14
  */
-$wgEnableImageWhitelist = true;
+$wgEnableImageWhitelist = false;
 
 /**
  * A different approach to the above: simply allow the "<img>" tag to be used.
@@ -4254,74 +4282,24 @@ $wgAllowImageTag = false;
 /**
  * Configuration for HTML postprocessing tool. Set this to a configuration
  * array to enable an external tool. By default, we now use the RemexHtml
- * library; historically, Dave Raggett's "HTML Tidy" was typically used.
- * See https://www.w3.org/People/Raggett/tidy/
- *
- * Setting this to null is deprecated.
- *
- * If this is null and $wgUseTidy is true, the deprecated configuration
- * parameters will be used instead.
- *
- * If this is null and $wgUseTidy is false, a pure PHP fallback will be used.
- * (Equivalent to setting `$wgTidyConfig['driver'] = 'disabled'`.)
- *
- * Keys are:
- *  - driver: May be:
- *    - RemexHtml: Use the RemexHtml library in PHP
- *    - RaggettInternalHHVM: Use the limited-functionality HHVM extension
- *      Deprecated since 1.32.
- *    - RaggettInternalPHP: Use the PECL extension
- *      Deprecated since 1.32.
- *    - RaggettExternal: Shell out to an external binary (tidyBin)
- *      Deprecated since 1.32.
- *    - disabled: Disable tidy pass and use a hacky pure PHP workaround
- *      (this is what setting $wgUseTidy to false used to do)
- *      Deprecated since 1.32.
- *
- *  - tidyConfigFile: Path to configuration file for any of the Raggett drivers
- *  - debugComment: True to add a comment to the output with warning messages
- *  - tidyBin: For RaggettExternal, the path to the tidy binary.
- *  - tidyCommandLine: For RaggettExternal, additional command line options.
+ * library; historically, other postprocessors were used.
+ *
+ * Setting this to null will use default settings.
+ *
+ * Keys include:
+ *  - driver: formerly used to select a postprocessor; now ignored.
+ *  - treeMutationTrace: a boolean to turn on Remex tracing
+ *  - serializerTrace: a boolean to turn on Remex tracing
+ *  - mungerTrace: a boolean to turn on Remex tracing
+ *  - pwrap: whether <p> wrapping should be done (default true)
+ *
+ * See includes/tidy/RemexDriver.php for detail on configuration.
+ *
+ * Overriding the default configuration is strongly discouraged in
+ * production.
  */
 $wgTidyConfig = [ 'driver' => 'RemexHtml' ];
 
-/**
- * Set this to true to use the deprecated tidy configuration parameters.
- * @deprecated since 1.26, use $wgTidyConfig['driver'] = 'disabled'
- */
-$wgUseTidy = false;
-
-/**
- * The path to the tidy binary.
- * @deprecated since 1.26, use $wgTidyConfig['tidyBin']
- */
-$wgTidyBin = 'tidy';
-
-/**
- * The path to the tidy config file
- * @deprecated since 1.26, use $wgTidyConfig['tidyConfigFile']
- */
-$wgTidyConf = $IP . '/includes/tidy/tidy.conf';
-
-/**
- * The command line options to the tidy binary
- * @deprecated since 1.26, use $wgTidyConfig['tidyCommandLine']
- */
-$wgTidyOpts = '';
-
-/**
- * Set this to true to use the tidy extension
- * @deprecated since 1.26, use $wgTidyConfig['driver']
- */
-$wgTidyInternal = extension_loaded( 'tidy' );
-
-/**
- * Put tidy warnings in HTML comments
- * Only works for internal tidy.
- * @deprecated since 1.26, use $wgTidyConfig['debugComment']
- */
-$wgDebugTidy = false;
-
 /**
  * Allow raw, unchecked HTML in "<html>...</html>" sections.
  * THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
@@ -4493,6 +4471,8 @@ $wgCentralIdLookupProvider = 'local';
  *             commonly chosen. Set to integer n to ban the top n passwords.
  *             If you want to ban all common passwords on file, use the
  *             PHP_INT_MAX constant.
+ *     - PasswordNotInLargeBlacklist - Password not in best practices list of
+ *             100,000 commonly used passwords.
  * @since 1.26
  */
 $wgPasswordPolicy = [
@@ -4502,29 +4482,34 @@ $wgPasswordPolicy = [
                        'MinimumPasswordLengthToLogin' => 1,
                        'PasswordCannotMatchUsername' => true,
                        'PasswordCannotBePopular' => 25,
+                       'PasswordNotInLargeBlacklist' => true,
                ],
                'sysop' => [
                        'MinimalPasswordLength' => 8,
                        'MinimumPasswordLengthToLogin' => 1,
                        'PasswordCannotMatchUsername' => true,
                        'PasswordCannotBePopular' => 25,
+                       'PasswordNotInLargeBlacklist' => true,
                ],
                'interface-admin' => [
                        'MinimalPasswordLength' => 8,
                        'MinimumPasswordLengthToLogin' => 1,
                        'PasswordCannotMatchUsername' => true,
                        'PasswordCannotBePopular' => 25,
+                       'PasswordNotInLargeBlacklist' => true,
                ],
                'bot' => [
                        'MinimalPasswordLength' => 8,
                        'MinimumPasswordLengthToLogin' => 1,
                        'PasswordCannotMatchUsername' => true,
+                       'PasswordNotInLargeBlacklist' => true,
                ],
                'default' => [
                        'MinimalPasswordLength' => 1,
                        'PasswordCannotMatchUsername' => true,
                        'PasswordCannotMatchBlacklist' => true,
                        'MaximalPasswordLength' => 4096,
+                       'PasswordNotInLargeBlacklist' => false,
                ],
        ],
        'checks' => [
@@ -4533,7 +4518,8 @@ $wgPasswordPolicy = [
                'PasswordCannotMatchUsername' => 'PasswordPolicyChecks::checkPasswordCannotMatchUsername',
                'PasswordCannotMatchBlacklist' => 'PasswordPolicyChecks::checkPasswordCannotMatchBlacklist',
                'MaximalPasswordLength' => 'PasswordPolicyChecks::checkMaximalPasswordLength',
-               'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist'
+               'PasswordCannotBePopular' => 'PasswordPolicyChecks::checkPopularPasswordBlacklist',
+               'PasswordNotInLargeBlacklist' => 'PasswordPolicyChecks::checkPasswordNotInLargeBlacklist',
        ],
 ];
 
@@ -4564,10 +4550,6 @@ $wgAuthManagerConfig = null;
  */
 $wgAuthManagerAutoConfig = [
        'preauth' => [
-               MediaWiki\Auth\LegacyHookPreAuthenticationProvider::class => [
-                       'class' => MediaWiki\Auth\LegacyHookPreAuthenticationProvider::class,
-                       'sort' => 0,
-               ],
                MediaWiki\Auth\ThrottlePreAuthenticationProvider::class => [
                        'class' => MediaWiki\Auth\ThrottlePreAuthenticationProvider::class,
                        'sort' => 0,
@@ -4884,7 +4866,6 @@ $wgDefaultUserOptions = [
        'rows' => 25, // @deprecated since 1.29 No longer used in core
        'showhiddencats' => 0,
        'shownumberswatching' => 1,
-       'showtoolbar' => 1,
        'skin' => false,
        'stubthreshold' => 0,
        'thumbsize' => 5,
@@ -6168,7 +6149,6 @@ $wgTrxProfilerLimits = [
                'maxAffected' => 1000
        ],
        'POST-nonwrite' => [
-               'masterConns' => 0,
                'writes' => 0,
                'readQueryTime' => 5,
                'readQueryRows' => 10000
@@ -7536,7 +7516,10 @@ $wgJobClasses = [
        'refreshLinksPrioritized' => RefreshLinksJob::class,
        'refreshLinksDynamic' => RefreshLinksJob::class,
        'activityUpdateJob' => ActivityUpdateJob::class,
-       'categoryMembershipChange' => CategoryMembershipChangeJob::class,
+       'categoryMembershipChange' => function ( Title $title, $params = [] ) {
+               $pc = MediaWikiServices::getInstance()->getParserCache();
+               return new CategoryMembershipChangeJob( $pc, $title, $params );
+       },
        'clearUserWatchlist' => ClearUserWatchlistJob::class,
        'cdnPurge' => CdnPurgeJob::class,
        'userGroupExpiry' => UserGroupExpiryJob::class,
@@ -8585,6 +8568,9 @@ $wgUploadMaintenance = false;
  * 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).
  *
+ * @note To determine the default model for a new page's main slot, or any slot in general,
+ * use SlotRoleHandler::getDefaultModel() together with SlotRoleRegistry::getRoleHandler().
+ *
  * @since 1.21
  */
 $wgNamespaceContentModels = [];
@@ -8902,6 +8888,9 @@ $wgCSPFalsePositiveUrls = [
        'https://rtb.metrigo.com' => true,
        'https://d5p.de17a.com' => true,
        'https://ad.lkqd.net/vpaid/vpaid.js' => true,
+       'https://ad.lkqd.net/vpaid/vpaid.js?fusion=1.0' => true,
+       'https://t.lkqd.net/t' => true,
+       'chrome-extension' => true,
 ];
 
 /**
@@ -8957,7 +8946,7 @@ $wgInterwikiPrefixDisplayTypes = [];
  * @since 1.30
  * @var int One of the MIGRATION_* constants
  */
-$wgCommentTableSchemaMigrationStage = MIGRATION_OLD;
+$wgCommentTableSchemaMigrationStage = MIGRATION_NEW;
 
 /**
  * RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
@@ -8999,30 +8988,24 @@ $wgMultiContentRevisionSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_
 $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_OLD;
 
 /**
- * change_tag table schema migration stage.
- *
- * - MIGRATION_OLD: Do not use change_tag_def table or ct_tag_id.
- * - MIGRATION_WRITE_BOTH: Write to the change_tag_def table and ct_tag_id, but read from
- *   the old schema. This is different from the formal definition of the constants
- * - MIGRATION_WRITE_NEW: Behaves the same as MIGRATION_WRITE_BOTH
- * - MIGRATION_NEW: Use the change_tag_def table and ct_tag_id, do not read/write ct_tag
+ * Flag to enable Partial Blocks. This allows an admin to prevent a user from editing specific pages
+ * or namespaces.
  *
  * @since 1.32
- * @var int One of the MIGRATION_* constants
+ * @deprecated 1.32
+ * @var bool
  */
-$wgChangeTagsSchemaMigrationStage = MIGRATION_WRITE_BOTH;
+$wgEnablePartialBlocks = false;
 
 /**
- * Temporarily flag to use change_tag_def table as backend of change tag statistics.
- * For example in case of Special:Tags. If set to false, it will use change_tag table.
- * Before setting it to true set $wgChangeTagsSchemaMigrationStage to MIGRATION_WRITE_BOTH and run
- * PopulateChangeTagDef maintaince script.
- * It's redundant when $wgChangeTagsSchemaMigrationStage is set to MIGRATION_NEW
+ * Enable stats monitoring when Block Notices are displayed in different places around core
+ * and extensions.
  *
- * @since 1.32
+ * @since 1.34
+ * @deprecated 1.34
  * @var bool
  */
-$wgTagStatisticsNewTable = false;
+$wgEnableBlockNoticeStats = false;
 
 /**
  * For really cool vim folding this needs to be at the end: