Manual:deleteEqualMessages.php
Appearance
MediaWiki version: | ≥ 1.21 |
MediaWiki file: deleteEqualMessages.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | DeleteEqualMessages |
Details
[edit]deleteEqualMessages.php file is a maintenance script to delete all pages in the MediaWiki namespace of which the content is equal to the system default. This is useful to make sure all messages will be pulled from TranslateWiki.net once wiki is upgraded.
Options/Arguments
[edit]Option | Description | Required? |
---|---|---|
--delete | Does the deletion of the pages. | Optional |
--delete-talk | Delete talk pages as well; do not leave orphaned talk pages behind. Should be used together with "--delete". | Optional |
--lang-code | Check for subpages of this lang-code (default: root page against content language) | Optional |
Usage
[edit]php maintenance/run.php deleteEqualMessages [ --delete| --delete-talk| --lang-code ]
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php
instead of php maintenance/run.php scriptName
.Checking potential deletion
[edit]Terminal
$ php maintenance/run.php deleteEqualMessages Checking for pages with default message... ... fetching message info for content language 1 pages in the MediaWiki namespace override messages. 1 pages are equal to the default message (+ 0 talk pages). List: * MediaWiki:Mywatchlist Run the script again with --delete to delete these pages
Making actual deletion
[edit]Terminal
$ php maintenance/run.php deleteEqualMessages --delete Checking for pages with default message... ... fetching message info for content language 1 pages in the MediaWiki namespace override messages. 1 pages are equal to the default message (+ 0 talk pages). ...deleting equal messages (this may take a long time!)... * MediaWiki:Mywatchlist done!