Manual:CleanupTitles.php/ko
Appearance
| 미디어위키 버전: | ≥ 1.6 |
| 미디어위키 파일: cleanupTitles.php | |
|---|---|
| 위치: | maintenance/ |
| 소스 코드: | master • 1.46.2 • 1.45.6 • 1.43.11 |
| 클래스: | TitleCleanup |
상세
cleanupTitles.php is a maintenance script located in the maintenance directory that can be used to clean up broken, unparseable titles.
This script is rather useful for cases in which someone has added a new interwiki prefix (e.g. commandos:) to the interwiki table and thereby caused mainspace pages with ambiguous titles (e.g. Commandos: Behind Enemy Lines) to become inaccessible.
Likewise, the script can be used to process changes in $wgLegalTitleChars that rendered previously valid page titles inaccessible.
Note that namespaceDupes.php is often a preferable option, if the goal is to move pages into their proper namespace.
옵션/인수
| Option | Description | Required? |
|---|---|---|
| --dry-run | Perform a dry run | Optional |
| --reporting-interval | How often to print status line | Optional |
사용법
php maintenance/run.php cleanupTitles [ --dry-run| --reporting-interval ]
In MediaWiki version 미디어위키 1.39 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php instead of php maintenance/run.php scriptName.Checking for bad titles with dry-run
Terminal
$ php maintenance/run.php cleanupTitles --dry-run Checking for bad titles... Processing page... page 1 (main_Page) doesn't match self. DRY RUN: would rename 1 (0,'main_Page') to (0,'Broken/Main_Page') page 2 (saraswati_Maa) doesn't match self. DRY RUN: would rename 2 (0,'saraswati_Maa') to (0,'Broken/Saraswati_Maa') page 4 (abc) doesn't match self. DRY RUN: would rename 4 (0,'abc') to (0,'Broken/Abc') Finished page... 3 of 11 rows updated
Checking and fixing bad titles
Terminal
$ php maintenance/run.php cleanupTitles Checking and fixing bad titles... Processing page... page 1 (main_Page) doesn't match self. renaming 1 (0,'main_Page') to (0,'Broken/Main_Page') page 2 (saraswati_Maa) doesn't match self. renaming 2 (0,'saraswati_Maa') to (0,'Broken/Saraswati_Maa') page 4 (abc) doesn't match self. renaming 4 (0,'abc') to (0,'Broken/Abc') Finished page... 3 of 11 rows updated
Fixed pages are moved to Broken/<foo> (where <foo> is the cleaned up version of the broken title)