Manual:cleanupUsersWithNoId.php
From Linux Web Expert
<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.31
<translate> MediaWiki version:</translate> |
MediaWiki ファイル: cleanupUsersWithNoId.php | |
---|---|
場所: | maintenance/ |
ソース コード: | master • 1.41.1 • 1.40.3 • 1.39.7 |
クラス: | CleanupUsersWithNoId |
詳細
cleanupUsersWithNoId.php is a maintenance script that cleans up tables that have valid usernames with no user ID. It should once be run in wikis that contain imported revisions or global blocks via the CentralAuth extension.
オプション/引数
オプション | 説明 | 必須かどうか |
---|---|---|
--prefix | Interwiki prefix to apply to the usernames. This is a required parameter. | <translate> Required</translate> |
--table | Only clean up this table. The name of one single table can be provided here. If not provided, all affected tables will be cleaned up. These are: revision, archive, logging, image, oldimage, filearchive, ipblocks and recentchanges. | <translate> Optional</translate> |
--assign | Assign edits to existing local users if they exist. | <translate> Optional</translate> |
使用法
php maintenance/cleanupUsersWithNoId.php --prefix [ --table| --assign ]
Terminal
$ php maintenance/cleanupUsersWithNoId.php --prefix '*' --table revision
This will only clean up the revision table.
<translate> Whenever the script runs, it makes a note in the database and will not run again.</translate> <translate> If you want to run the script again, run the command with the <tvar name=1>--force</tvar> option.</translate>
Release changes
Changes since MediaWiki 1.34.1
- (T238043) cleanupUsersWithNoId.php: Handle missing fields.