Jump to content

MediaWiki 1.35/zh: Difference between revisions

From mediawiki.org
Content deleted Content added
No edit summary
m Undid edits by 72.202.27.109 (talk) to last version by Unite together
Tag: Manual revert
Line 59: Line 59:
* ({{PhabT|245931}}) meta=siteinfo&siprop=interwikimap no longer reports language or extralanglink when {{ll|Manual:$wgInterwikiMagic|$wgInterwikiMagic}} is false.
* ({{PhabT|245931}}) meta=siteinfo&siprop=interwikimap no longer reports language or extralanglink when {{ll|Manual:$wgInterwikiMagic|$wgInterwikiMagic}} is false.


{{note|1=Red Hat 8和CentOS 7默认提供PHP 7.2。 你将需要从[[Special:MyLanguage/Manual:Running MediaWiki on Red Hat Linux#Install operating system packages|软件集合(SCL)或AppStream]]安装更新版本。Special:MyLanguage/Manual:Running MediaWiki on Red Hat Linux#Install operating system packages}}
{{note|1=Red Hat 8和CentOS 7默认提供PHP 7.2。 你将需要从[[Special:MyLanguage/Manual:Running MediaWiki on Red Hat Linux#Install operating system packages|软件集合(SCL)或AppStream]]安装更新版本。}}


== 子页面 ==
== 子页面 ==

Revision as of 07:11, 20 January 2022

如果使用PHP8,建议使用MediaWiki 1.38.4或更高版本。 PHP8尚未被维基媒体下的各wiki使用,因此没有得到太多测试,但有其他组织在PHP8上运行MediaWiki时并未遇到问题。 如果您在PHP8上使用MediaWiki时遇到任何问题,请在此处报告 参见工單T248925以获取更多信息。
警告 警告: MediaWiki 1.35 不再支持PHP 7.2,請更新至PHP 7.3.19或以上版本。

MediaWiki 1.35是MediaWiki最新的穩定长期支持发行版本。 参阅发行说明文件获取完整更新列表。 自2019年10月1日起,通过增量更新的"wmf "-分支部署在维基基金会管理的wiki上。 该1.35.0的稳定版本已于2020年9月25日发行。 下载mediawiki-1.39.8.tar.gz或者使用git更新REL1_35分支来获得此版本。 它將在2023年9月停止支持。

新功能

  • 特殊頁面Special:EditPageSpecial:PageHistorySpecial:PageInfoSpecial:Purge已被建立作為捷徑。 Special:EditPage/Foo重新導向至title=foo&action=edit,PageHistory,PageInfo和Purge分別對應&action = history,info和purge。當連結時,其子頁面會被當做目標。否則,它將顯示基本頁面以允許終端用戶手動指定目標(參見工單T13456)。
  • 在“?action=watch”的表格現在使用新版下拉列表以支持選擇觀察列表項目的過期時間(如果$wgWatchlistExpiry true)。

新增的附带扩展

MediaWiki 1.35附帶VisualEditor 擴展,其能提供可視化編輯系統作為傳統源代碼編輯器的第二選擇。因為其已經被構建入MediaWiki核心,故此不需要建立一個單獨的Parsoid實例。

另外,SecureLinkFixer TemplateData 也已附帶進MediaWiki。它們將在你的wiki上強制啟用https链接,並建立一個標籤和接口以允許編者指定模板如何被引用。

Action API 变化

  • The 'suggest' parameter of action=opensearch has been deprecated. The API behaves the same with and without this parameter. It was previously used by $wgEnableOpenSearchSuggest to partially disable the API if set to false. Specifically, it would deny internal frontend requests carrying this parameter, whilst accepting other requests.
  • Integer-type parameters are now validated for syntax rather than being interpreted in surprising ways. For example, the following will now return a badinteger error:
    • "1.9" (formerly interpreted as "1")
    • " 1" (formerly interpreted as "1")
    • "1e1" (formerly interpreted as "1" or "10", depending on the PHP version)
    • "1foobar" (formerly interpreted as "1")
    • "foobar" (formerly intepreted as "0") parameters. Ranges should be assumed to be enforced.
  • Many user-type parameters now accept a user ID, formatted like "#12345".
  • The 'assert' parameter used by all API modules now supports the value 'anon'. When specified, the API will return the 'assertanonfailed' error if the user is logged in.
  • action=edit now supports the 'baserevid' parameter for edit conflict detection, as an alternative to 'basetimestamp'. Note that self-conflicts will continue to be ignored if 'basetimestamp' is set, but not if only 'baserevid' is set.
  • A new module was added to change the content model of existing pages. Use action=changecontentmodel. Unlike Special:ChangeContentModel, the api module does not work for pages that do not already exist.
  • If $wgWatchlistExpiry is true, the following API changes are made:
    • action=watch accepts a new 'expiry' parameter analagous to the expiry accepted by action=userrights, action=block, etc., except it must be no greater than $wgWatchlistExpiryMaxDuration , or an infinity value.
    • action=query&list=watchlistraw returns pages' watchlist expiry dates.
  • (任务 T249526) action=login will now return Failed rather than NeedToken on session loss.

Action API 变化

  • The Action API now uses the Wikimedia\ParamValidator library for parameter validation, which brings some new features and changes. For the most part existing module code should work as it did before, but see subsequent notes for changes.
    • The values for all ApiBase PARAM_* constants have changed. Code should have been using the constants rather than hard-coding the values.
    • Several ApiBase PARAM_* constants have been deprecated, see the in-class documentation for details. Use the equivalent ParamValidator constants instead.
    • The value returned for 'upload'-type parameters has changed from WebRequestUpload to Psr\Http\Message\UploadedFileInterface.
  • Validation of 'user'-type parameters is more flexible. PARAM constants exist to specify the type of "user" allowed and to request UserIdentity objects rather than name strings. The default is to accept all types (name, IP, range, and interwiki) that were formerly accepted.
  • Maximum limits are no longer ignored in "internal mode".
  • The $paramName to ApiBase::handleParamNormalization() should now include the prefix.
  • (任务 T245931) meta=siteinfo&siprop=interwikimap no longer reports language or extralanglink when $wgInterwikiMagic is false.
Red Hat 8和CentOS 7默认提供PHP 7.2。 你将需要从软件集合(SCL)或AppStream安装更新版本。

子页面