This page is a translated version of the page MediaWiki 1.38 and the translation is 17% complete.
Outdated translations are marked like this.

MediaWiki 1.38是MediaWiki當前的穩定发行版本。 参阅发行说明文件获取完整更新列表。 从2021年9月到2022年3月,通过增量更新的"wmf"-分支部署在维基媒体基金会管理的wiki上。 1.38.0的穩定發行已在2022年6月2日釋出。 下载1.38.7或者使用git更新REL1_38分支来获得此版本。

對系統管理員的配置變更

MediaWiki 1.38 引入了导入配置的新系统。 这个新系统与传统的配置方法兼容,但它提供了一些新的功能。 提倡有意愿的群体试验导入配置的新方法并且反馈他们遇到的所有问题。

新配置

  • (T297708) $wgMaxExecutionTimeForExpensiveQueries – 此設定可用於控制數個高耗資查詢頁面 (例如,「近期變更」和「使用者貢獻」) 的最長執行時間。
  • $wgBrowserFormatDetection – 此設定允許覆寫瀏覽器對格式的自動偵測及處理。 它最开始被用来防止在维基页面中可能出现的电话号码在iOS系统的Safari中被自动链接;这个设定可以按需重新激活,或者为其他浏览器的特殊设定进行适配。
  • (T240685) $wgMetricsTarget, $wgMetricsFormat, and $wgMetricsPrefixThese provide configuration for a new MetricsFactory service with support for the dogstatsd format, intended for integration with Prometheus.
  • $wgGroupInheritsPermissionsThis setting allows inheriting permissions, both granted and revoked, from another group.
  • $wgForeignApiReposForeignAPIRepo现在有一个apiMetadataExpiry的选项以控制文件的原数据的缓存时间。 并且,默认时间设定从1小时改为了4小时。
  • $wgSkinsPreferred – 这使得你可以将更喜欢的一系列皮肤在参数设置中列在更靠前的位置。
  • 警告 警告: 实 验 性 功 能(参见导入新系统给出的文档)
    • $wgWikiFarmSettingsDirectory – 一个包含因站点而异的配置文件的目录。 Setting this will enable multi-tenant ("wiki farm") mode, causing site-specific settings to be loaded based on information from the web request.
    • $wgWikiFarmSettingsExtensionThe file extension to be used when looking up site-specific settings files in $wgWikiFarmSettingsDirectory, such as json or yaml.
    • $wgWikiFarmSiteDetectorA callback function that returns the name of the wiki for the current request. Replaced by the MW_WIKI_NAME environment variable in 1.39. This is used in multi-tenant ("wiki farm") mode to determine which settings file to load from $wgWikiFarmSettingsDirectory.
  • $wgEnableRemoteBagOStuffTestsThis replaces the environment variable PHPUNIT_USE_BAGOSTUFF.
  • (T230211) $wgForceDeferredUpdatesPreSendForce deferred updates to be run before sending a response to the client, instead of attempting to run them after sending the response. Setting this to true is useful for end-to-end testing, to ensure that the effects of a request are visible to any subsequent requests, even if they are made immediately after the first one. Note however that this does not ensure that database replication is complete, nor does it execute any jobs enqueued for later.
  • $wgTemplateLinksSchemaMigrationStagetemplatelinks table schema migration stage, for normalizing tl_namespace and tl_title fields.

Changed configuration

  • $wgStyleDirectory and $wgExtensionDirectory – 这些将被延后设置,所以在LocalSettings.php中不再可用,除非在该文件中被清楚设定。
  • $wgFileBackends – 此设置不再将fileJournal视作一个选项。
  • $wgMaxImageAreaThis setting may now be set to false to disable size checking before scaling. Extensions can still override its value by using the BitmapHandlerCheckImageArea hook.
  • $wgAjaxUploadDestCheck(已弃用) Act as always-true.
  • $wgInterwikiCacheThis no longer supports the string value for CDB files.
  • (T292321) $wgParserOutputHooks(已弃用) Adjustments using this should be done with OutputPageParserOutputHook instead.
  • $wgExternalStoresThis is newly documented in includes/externalstore/README.md.

Removed configuration

  • $wgShellLocaleThis setting has been removed, as it was a flawed solution to the problem of locale dependence. MediaWiki will now always set a locale of C.UTF-8 or C and works around the remaining problems of the C locale by not using escapeshellarg. This follows the direction of PHP 8.0, which sets a locale of C by default instead of respecting LC_CTYPE.
  • (T293848) $wgLoggedOutMaxAgeExperiment removed, originally added in 1.35.
  • $wgIncludejQueryMigrate(在1.36版本中已弃用) We only support jQuery v3.
  • $wgUseCategoryBrowserThis experimental feature has been removed. If you still need to use this feature, please see Extension:CategoryExplorer .
  • $wgStyleSheetPath(在1.3版本中已弃用) Alias for $wgStylePath.

New user-facing features

Bundled extensions

  • (T191740) The AbuseFilter extension is now bundled with MediaWiki. This is an anti-abuse feature that allows privileged users to set specific actions to be taken when actions by users, such as edits or file uploads, match certain criteria.
  • (T232948) The Math extension is now bundled with MediaWiki. This is a content feature that lets users create mathematical formulæ, written in a sub-set of LaTeX and rendered in MathML with a fallback SVG image. By default, it will use Wikimedia's mathoid service to render each formula, but local rendering can be set up for network isolation or performance.
  • (T191743) The Minerva skin is now bundled with MediaWiki. This is a simple, light-weight, and scalable skin that is particularly optimised for mobile use, and integrates well with the MobileFrontend extension (available separately), but can also be used as a regular desktop skin.

Other changes

  • (T284921) The "auto-number headings" feature was removed following a consultation, due to performance reasons.

New operator/developer features

  • The configuration mechanism changed substantially; you can read more about how.
  • 警告 警告: EXPERIMENTAL: The environment variable MW_CONFIG_FILE can be used to specify the location of the settings file. This allows alternative settings files to be loaded depending on the environment. Settings files may be given as PHP files like the traditional LocalSettings.php file, or they may use JSON or YAML format. See Manual:YAML settings file format
  • Added a deleteUserEmail maintenance script – This file enables the deletion of a given user's associated email address. It can be helpful for privacy-preserving operations.
  • The description array for constructing an HTMLForm now can use 'disable-if' to disable fields on a condition easily, supported expressions are the same as 'hide-if'.
  • There is a new interface, IForeignRepoWithMWApi, to allow you to mark file repos provided by an extension as supporting making API queries against the foreign file repo so that extensions like TimedMediaHandler that depend on this can stop hard-coding looking for specific class names.
  • 警告 警告: EXPERIMENTAL Added support for an easy to configure multi-tenant ("wiki farm") mode: Settings for each site can be placed in a directory specified by $wgWikiFarmSettingsDirectory. Site detection is controlled by $wgWikiFarmSiteDetector and defaults to the requested host name. For example, setting $wgWikiFarmSettingsDirectory = "sites" would cause the settings for wiki.example.com to be loaded from "sites/wiki_example_com.yaml". WARNING: YAML files under the Web root may be accessible to browsers, please take appropriate measures to protect them from access via HTTP.
  • Running QUnit tests for an individual test suite module is possible with grunt qunit --qunit-component={componentName}, where {componentName} is "MediaWiki" to run core's QUnit tests or the skin or extension name.
  • The mediawiki.mixins module now has a .user-select() Less mixin.

External library changes

New external libraries

  • symfony/yaml was promoted from development-only.

Changed external libraries

  • Updated OOUI from v0.42.0 to v0.43.2.
  • Updated Vue from 2.6.11 to 3.2.23.
  • Updated WVUI from v0.3.0 to v0.4.0.
  • Updated composer/semver from 3.2.5 to 3.2.6.
  • Updated guzzlehttp/guzzle from 7.2.0 to 7.4.1.
  • Updated pear/mail_mime from 1.10.9 to 1.10.11.
  • Updated pear/net_smtp from 1.9.2 to 1.10.0.
  • Updated psr/log from 1.1.3 to 1.1.4.
  • Updated psy/psysh from 0.10.5 to 0.11.1.
  • Updated symfony/polyfill-php80 from 1.23.1 to 1.25.0.
  • Updated wikimedia/assert from 0.5.0 to 0.5.1.
  • Updated wikimedia/cdb from 1.4.1 to 2.0.0.
  • Updated wikimedia/ip-utils from 3.0.2 to 4.0.0.
  • Updated wikimedia/minify from 2.2.4 to 2.2.6.
  • Updated wikimedia/object-factory from 3.0.2 to 4.0.0.
  • Updated wikimedia/parsoid from v0.14.0-a14 to v0.15.0.
  • Updated wikimedia/purtle from 1.0.7 to 1.0.8.
  • Updated wikimedia/request-timeout from 1.1.0 to 1.2.0.
  • Updated wikimedia/shellbox from 2.0.0 to 3.0.0.
  • Updated wikimedia/wrappedstring from 3.2.0 to 4.0.1.
Changed development-only external libraries
  • Updated QUnit from 2.16.0 to 2.18.0.
  • Updated composer/semver from 3.5.4 to 3.5.5.
  • Updated composer/spdx-licenses from 1.5.4 to 1.5.5.
  • Updated doctrine/dbal for PHP < 7.3 from 2.10.4 to 2.13.6.
  • Updated doctrine/dbal for PHP >= 7.3 from 3.0.0 to 3.1.5.

Removed external libraries

  • jquery.jStorage, deprecated since MW 1.28; use mediawiki.storage instead.

Action API changes

  • New deletetalk parameter on action=delete that allows you to delete the associated talk page of a subject page.
  • (T117549) New variant parameter for all API actions, for specifying language variant (akin to the existing variant parameter for index.php).

Languages updated

MediaWiki supports over 400 languages. Many localisations are updated regularly. Below only new and removed languages are listed, as well as changes to languages because of Phabricator reports.

  • (T292166) Updated namespace names for the Lombard language.
  • (T299201) Changed the autonym of the 昂加语 (anp) language to अंगिका
  • (T298309) Changed the autonym of the 阿布哈西亚语 (ab) language to аԥсшәа
  • (T302972) Changed the autonym of the 隆迪语 (rn) language to ikirundi
  • (T220303) Show numbered lists with Burmese numerals in relevant languages
  • (T291899) Added language support for 湘语 (hsn).
  • (T292612) Added language support for S'gaw Karen (ksw).
  • (T293656) Added language support for 弗拉弗拉文 (gur).
  • (T294729) Added language support for Pa'O (blk).
  • (T296286) Added language support for 斯科特萨米语 (sms).
  • (T296612) Added language support for Makhuwa (vmw).
  • (T296707) Added language support for 加族语 (gaa).
  • (T297073) Added language support for Nanai (gld).
  • (T297074) Added language support for Nawdm (nmz).
  • (T298075) Added language support for Northern Thai (nod).
  • (T298182) Added language support for 卡布佛得鲁语 (kea).
  • (T298385) Added language support for 恩加图语 (yrl).
  • (T299329) Added language support for 丰语 (fon).
  • (T300474) Added language support for 尼昂科勒语 (nyn).
  • (T302556) Added language support for Pannonian Rusyn (rsk).

Subpages