Manual:refreshFileHeaders.php
From Linux Web Expert
MediaWiki ファイル: refreshFileHeaders.php | |
---|---|
場所: | maintenance/ |
ソース コード: | master • 1.41.1 • 1.40.3 • 1.39.7 |
クラス: | RefreshFileHeaders |
詳細
refreshFileHeaders.phpファイルは、メタデータからファイルのヘッダーを更新する保守スクリプトです。
オプション
オプション | 説明 | 必須かどうか |
---|---|---|
--verbose | Output information about each file | <translate> Optional</translate> |
--start | Name of file to start with | <translate> Optional</translate> |
--end | Name of file to end with | <translate> Optional</translate> |
--media_type | Media type to filter for | <translate> Optional</translate> |
--major_mime | Major MIME type to filter for | <translate> Optional</translate> |
--minor_mime | Minor MIME type to filter for | <translate> Optional</translate> |
--refreshContentType | Set to true to refresh file content type from mime data in database | <translate> Optional</translate> |
使用法
php maintenance/refreshFileHeaders.php [ --start| --end| --major_mime| --media_type| --minor_mime| --refreshContentType| --verbose ]
Refreshing file metadata
Terminal
$ php maintenance/refreshFileHeaders.php Processing next 12 row(s) starting with 1631330937964.jpeg. Updating headers for 12 file(s). Done. Updated headers for 12 file(s).
Refreshing files' metadata with verbose
Terminal
$ php maintenance/refreshFileHeaders.php --verbose Processing next 12 row(s) starting with 1631330937964.jpeg. Queued headers update for file '1631330937964.jpeg'. Queued headers update for file 'Logo.jpg'. Queued headers update for file 'r-foundation-logo2.png'. Queued headers update for file 'Screenshot_2021-08-12_at_11.10.17_AM.png'. Queued headers update for file 'Foo.jpeg'. Queued headers update for file 'AkaInfo.png'. Queued headers update for file 'Bar.jpeg'. Queued headers update for file 'Screenshot_2021-08-13_at_11.10.17_AM.png'. Queued headers update for file 'Karma.jpeg'. Queued headers update for file 'Wikilogo.png'. Queued headers update for file 'Wikiversity-logo.jpeg'. Queued headers update for file 'Twink.png'. Updating headers for 12 file(s).'. Done. Updated headers for 12 file(s).
Refreshing only PNG files' metadata
Terminal
$ php maintenance/refreshFileHeaders.php --minor_mime png Processing next 6 row(s) starting with r-foundation-logo2.png. Queued headers update for file 'r-foundation-logo2.png'. Queued headers update for file 'Screenshot_2021-08-12_at_11.10.17_AM.png'. Queued headers update for file 'AkaInfo.png'. Queued headers update for file 'Screenshot_2021-08-13_at_11.10.17_AM.png'. Queued headers update for file 'Wikilogo.png'. Queued headers update for file 'Twink.png'. Updating headers for 6 file(s).'. Done. Updated headers for 6 file(s).