Manual:populateImageSha1.php
Appearance
この機能は、バージョン MediaWiki 1.43 で完全に除去されました。 |
| MediaWiki バージョン: | 1.19 – 1.43 |
| MediaWiki ファイル: populateImageSha1.php | |
|---|---|
| 場所: | maintenance/ |
| ソース コード: | master • 1.45.1 • 1.44. • 1.39.16 |
| クラス: | PopulateImageSha1 |
詳細
populateImageSha1.php file is a maintenance script to populate the img_sha1 field.
The img_sha1 field in the image table is used to store SHA-1 hash of the file contents in base 36 format.
This script runs by default when you run update.php.
オプション/引数
| オプション | 説明 | 必須かどうか |
|---|---|---|
| --multiversiononly | Calculate only for files with several versions | 省略可能 |
| --method | Use 'pipe' to pipe to mysql command line, default uses Database class | 省略可能 |
| --file | Fix for a specific file, without File: namespace prefixed | 省略可能 |
| --force | Recalculate sha1 for rows that already have a value | 省略可能 |
使用法
php maintenance/run.php populateImageSha1 [ --multiversiononly| --method| --file| --force ]
Terminal
$ php maintenance/run.php populateImageSha1 --force Populating and recalculating img_sha1 field Done 0 of 3, 0.000% Done 3 files in 0.2 seconds
スクリプトが実行されるたびに、データベース内にメモが作成され、二度と実行されないようになります。 このスクリプトをもう一度実行したい場合は、コマンドに --force オプションを付けて実行してください。
MediaWiki バージョン 1.39.16 以前では、メンテナンス スクリプトを
php maintenance/run.php スクリプト名 ではなく php maintenance/スクリプト名.php を使用して実行する必要があります。