MediaWiki 1.31/zh

MediaWiki 1.31是MediaWiki的最新发行版本. 参阅文件获取完整更新列表. 自2017年9月26日起，通过增量更新的"wmf"-分支部署在维基基金会管理的wiki上. 2018年6月13日1.31.0的稳定版本已发布. 下载或者在Git中签出 分支以关注此发布版本.

新增的附带扩展
与MediaWiki tarball捆绑在一起的扩展集已经增加. 新增内容包括：


 * 提供了在Wiki上编辑CSS和JavaScript时更友好的编辑界面.
 * 为图片或图片集提供一个灯箱效果的浏览.
 * 为Wiki帐号提供双因素身份验证.
 * 向管理员提供一个表格用于全Wiki的页面内容和页面标题的字符串替换.
 * 向管理员提供一个表格用于全Wiki的页面内容和页面标题的字符串替换.

Nuke扩展由于错误未包含在 MediaWiki 1.31.0 的Tar包中. 若您需要使用该扩展，请单独下载该扩展. 这将会在下一个MediaWiki的版本中修复.

Timeless皮肤
Timeless 是MediaWiki现在附带的一个全新响应皮肤.

CologneBlue 与 Modern
皮肤CologneBlue和皮肤Modern不再附带，不过它们仍然与MediaWiki兼容. 若您将升级且安装上述皮肤，请单独将它们下载下来.

Tidy已替换为HTML 5解析算法

 * 请参阅常见问题获取更多信息. 

基于HTML 4的Tidy库已经被名为RemexHtml的纯PHP HTML 5解析器所取代，以现代和标准兼容的方式清理不正确的wiki文本. 如果您的内容依赖于一些尚未完成的整洁修复，则需要修复它们.

您可以将Linter扩展与Parsoid结合使用来识别导致RemexHtml解析器渲染不同的问题的页面. ParserMigration扩展向编辑显示了渲染与整洁和RemexHtml的并排比较.

跨维基用户名
MediaWiki现在在修订版，日志条目等中支持 等格式的跨维基用户名. 这允许从外部wiki（例如由Wikibase生成）正确记录导入和事件，而不会混淆现在存在或可能在将来创建的本地帐户.


 * 导入现在将以 之类的格式记录未知（和可选的已知）用户名.
 * （用于历史页面、日志页面等）将显示形成为 Example的用户名作为跨维基链接 ，好像通过维基文本，如.

进一步的UI标准化

 * 作为MediaWiki产品标准化对话框的第一步，Html类现在为messageBox，successBox，errorBox提供了帮助方法. warningBox生成.

其他功能更新

 * 为所有用户添加90编辑/分钟的默认编辑速率限制. 这可以通过设置来更改.
 * 仅影响 操作.
 * 名为 的用户子页面现在受到与 和 页面，以便可以安全地放置配置选项.
 * 文件页面的信息页面现在在基本信息表中显示文件的base-16 SHA1哈希值.
 * pingback功能现在将发送每月心跳ping以识别活动的wiki.
 * 链接到不存在的页面的标签（如未创建的讨论页面的标签）现在有一个工具提示来指示状态，而不仅仅是颜色.

语言在1.31更新
MediaWiki支持350多种语言. 许多地方定期更新. 下面仅列出了新的和删除的语言，以及由于Phabricator报告，语言发生了变化.


 * Mirandese (mwl) now supports gendered /.
 * New language support: Nyungar (nys).
 * New language support: Siberian Tatar [cебертатар] (sty).
 * New language support: Guianan Creole (gcr).
 * New language support: Kumyk [къумукъ] (kum).
 * New language support: Spanish formal address (es-formal).
 * New language support: Hungarian formal address (hu-formal).
 * New language support: Gorontalo (gor).

现在需要PHP7或HHVM
MediaWiki 1.31需要PHP 7.0.0或更高版本. 虽然支持HHVM 3.18.5或更高版本，但通常建议使用PHP 7.0.0或更高版本来获得长期支持.

数据库更改
自1.30以来，1.31有几个数据库更改，如果没有架构更新，则无法运行. PostgreSQL用户现在需要9.2或更高版本.

修订表
请注意，由于对某些非常大的表（如修订表）进行了更改，架构更新可能需要很长时间（中型站点上的分钟数，大型站点上需要很长时间）. 升级之前不要忘记始终备份数据库！

存档表
如果您使用的是MySQL，SQLite或MSSQL，则不使用update.php来应用架构更改，并且无法停机以运行 并应用 ，你必须将默认值应用于 表的 和 列，或者制作那些 在升级到MediaWiki 1.31之前列可以为空. 显示了如何为MySQL执行此操作.

演员表
已记录操作的已登录或IP actor的标识正被移动到新的 表中，表中的行（如修订和日志记录）引用了actor ID，而不是存储每行中的用户ID和名称/IP.


 * This is currently gated by . Most wikis can set this to  and run   as soon as any necessary extensions are updated.
 * Most code accessing rows for logged actions from the database should use the relevant  methods to get the information needed to build the SQL query. The   class may also be used to get feature-flagged information needed to access actor-related fields during the migration period.

Configuration changes

 * and are now deprecated and will be removed in a future version. The API is now considered to be stable, secure and essential.
 * was removed, as it is now the default. This was documented as a temporary variable during the migration period, deprecated since 1.29.
 * has been updated to support SVG images and uses where possible for fallback images such as PNG.
 * will no longer ignore ' ' when user does not have the right to mark things patrolled.
 * Wikis that contain imported revisions or CentralAuth global blocks should run.
 * The configuration settings and, deprecated since 1.27, were removed.
 * now supports having fallbacks for browsers that are not using the latest version of the Referrer Policy specification.
 * is now set to  by default. This is a first step of migration to human-readable section IDs that will later result in ' ' being the default mode.
 * now only supports APC(u) or WinCache. XCache support was removed as upstream is inactive and has no plans to move to PHP 7.
 * The old  feature, including its related configuration option, has been removed.
 * The ' ' value for is no longer supported for performance reasons, and installations with this setting will now work as if it was configured with ' '.
 * MediaWiki now defaults to using  to tidy up user input, rather than being off by default. If you wish to disable HTML tidying entirely, set  to  ; if you wish to use the old, deprecated Tidy external binary, both set  to   and  to.
 * now defaults to  instead of.
 * was removed and will be ignored.
 * , deprecated and ignored since 1.25, was removed. See the 1.25 release notes for more information.
 * is now marked as deprecated, just like the deprecated AJAX framework that it enables. Some extensions mistakenly used this to check whether any AJAX functionality at all should be enabled, further making this problematic to retain.
 * is now deprecated, and will be removed in a future version. It has been marked as experimental ever since it was introduced.
 * now affects all database types. Old MediaWiki versions were setting this to 'mediawiki' during the installer, which may cause errors during the upgrade when your database is not PostgreSQL or MSSQL. In that case, remove this setting from LocalSettings.php.

Action API changes in 1.31

 * The ' ' value to  for   has been removed. It has never made a difference in the output, the name was always returned regardless.
 * The ' ' and ' ' parameters for  have been removed. They were deprecated and also accidentally nonfunctional since 1.17 in 2010. Use ' ' instead.

Other changes in 1.31

 * Browser support for Internet Explorer 10 was lowered from Grade A to Grade C.
 * Browser support for Opera 12 and older was dropped entirely. Opera 15+ continues at Grade A.
 * Multi-content-revision capability was introduced into the storage layer. See .
 * The " " CSS class is now only applied to unbracketed URLs in wikitext. Links written using square brackets will get the class " ", not " ".
 * : Whitespace is trimmed from wikitext headings, wikitext list items, wikitext table captions, wikitext table headings, wikitext table cells. HTML headings, HTML list items, HTML table captions, HTML table headings, HTML table cells will not have this trimming behavior.