MediaWiki version:
1.19
MediaWiki file: populateImageSha1.php
Location: maintenance/
Source code: master 1.40.0 1.39.4 1.35.11
Classes: PopulateImageSha1

Details

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.

Options/Arguments

Option Description Required?
--multiversiononlyCalculate only for files with several versionsOptional
--methodUse 'pipe' to pipe to mysql command line, default uses Database classOptional
--fileFix for a specific file, without File: namespace prefixedOptional
--forceRecalculate sha1 for rows that already have a valueOptional

Usage

php maintenance/populateImageSha1.php [ --multiversiononly| --method| --file| --force ]
Terminal
$ php maintenance/populateImageSha1.php --force

Populating and recalculating img_sha1 field
Done 0 of 3, 0.000%

Done 3 files in 0.2 seconds
Whenever the script runs, it makes a note in the database and will not run again. If you want to run the script again, run the command with the --force option.

See also

  • Image table
  • Manual:PopulateFilearchiveSha1.php
  • Manual:CleanupImages.php
  • Manual:CheckImages.php
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.