手册:NamespaceDupes.php
Outdated translations are marked like this.
MediaWiki文件: namespaceDupes.php | |
---|---|
位置: | maintenance/ |
源代码: | master • 1.43.0 • 1.42.5 • 1.39.11 |
类: | NamespaceDupes |
namespaceDupes.php是一个位于maintenance
目录下的维护脚本 ,可以用于清理增加名字空间 (或跨wiki 前缀)后导致的无法访问的标题。
用法
进入maintenance目录并运行:
$ ./maintenance/run namespaceDupes
This will show you what titles need updating, and which can be fixed automatically (because their destination titles do not exist). It won't actually change anything. To fix the titles, first run
$ ./maintenance/run namespaceDupes --fix
to fix the non-clashing ones, and then run
$ ./maintenance/run namespaceDupes --add-suffix='_(old)'
to add _(old)
to each title that clashes. Alternatively you could add a prefix instead. The suffix or prefix you use is of course up to you.
Note that these changes to the titles are not considered page moves and so no log entries are created.
选项/参数 | 描述 |
---|---|
--fix | 尝试自动修复错误。 您必须传递此选项,脚本才能对数据库实际执行任何更改。 否则,它将仅打印将要执行的操作。 更改指令是第二个选项(例如--add-prefix )。
|
--merge | 为了避免重命名冲突,会将正确的标题合并历史记录(如果已经存在具有有效标题的页面)。 如果无法访问的页面的最新修订版比合并页面的现有页面新,则此选项将无法使用,因为它将需要刷新搜索索引,最近的更改审核等。在这种情况下, |
--add-suffix=<文本> | 重复情况将在正确的名字空间下于文章名称后附加<text> |
--add-prefix=<文本> | 重复情况将在正确的名字空间下于文章名称前附加<text> |
--source-pseudo-namespace=<名字空间的名字> | 移动给定的源前缀下的所有页面(后面跟一个隐含的冒号)。 如果--dest-namespace未被指定,冒号会被替换为连字符。 |
--dest-namespace=<名字空间的编号> | 与--source-pseudo-namespace一起使用,指定目标命名空间的ID。 |
--move-talk | 如果指定此选项,则将重命名Talk(讨论)名字空间中以冲突前缀开头的页面,例如Talk:File:Foo -> File_talk:Foo |