Jump to content

手册:cleanupTitles.php

From mediawiki.org
This page is a translated version of the page Manual:CleanupTitles.php and the translation is 65% complete.
MediaWiki版本:
1.6

Details

cleanupTitles.php是一个位于maintenance目录下的维护脚本,可以用于清除受损的、无法解析的标题。 这一脚本对于某些用户在interwiki 表格中添加了新的跨wiki前缀(例如commandos:),从而导致主空间页面标题不明确(例如Commandos: Behind Enemy Lines)而无法访问。 同样,该脚本可用于处理$wgLegalTitleChars 中的更改,这些更改使以前有效的页面标题无法访问。 请注意,如果目标是将页面移入其适当的名称空间,则namespaceDupes.php 通常是一个更可取的选择。


Options/Arguments

选项 描述 Required?
--dry-run 执行试运行 Optional
--reporting-interval How often to print status line Optional

用法

php maintenance/run.php cleanupTitles [ --dry-run| --reporting-interval ]
在MediaWiki MediaWiki 1.39 及更早版本中,您必须通过php maintenance/脚本名称.php调用维护脚本,而不是php maintenance/run.php 脚本名称

Checking for bad titles with dry-run

Terminal

Checking and fixing bad titles

Terminal

被修复的页面将移动至移至Broken/<foo>标题(其中<foo>是受损标题的清理版本)

参阅