Jump to content
MediaWiki

Manual:RefreshFileHeaders.php

From mediawiki.org
This page is a translated version of the page Manual:RefreshFileHeaders.php and the translation is 33% complete.
Arquivo do MediaWiki: refreshFileHeaders.php
Localização: maintenance/
Código-fonte: master1.45.11.44.31.43.6
Classes: RefreshFileHeaders

Detalhes

O arquivo refreshFileHeaders.php é um script de manutenção para atualizar cabeçalhos de arquivos a partir de metadados.

Options

Option Description Required
--verbose Output information about each file Optional
--start Name of file to start with Optional
--end Name of file to end with Optional
--media_type Media type to filter for Optional
--major_mime Major MIME type to filter for Optional
--minor_mime Minor MIME type to filter for Optional
--refreshContentType Set to true to refresh file content type from mime data in database Optional


Usage

phpmaintenance/run.phprefreshFileHeaders[--start|--end|--major_mime|--media_type|--minor_mime|--refreshContentType|--verbose]
No MediaWiki versão 1.43.6 e anteriores, você deve invocar os scripts de manutenção usando php maintenance/scriptName.php em vez de php maintenance/run.php scriptName.

Refreshing file metadata

Terminal
$ php maintenance/run.php refreshFileHeaders
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/run.php refreshFileHeaders --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/run.php refreshFileHeaders --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).

See also

AltStyle によって変換されたページ (->オリジナル) /