From mediawiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgLocalFileRepo and the translation is 16% complete.
Other languages:
English • ‎Türkçe • ‎français • ‎magyar • ‎polski • ‎中文 • ‎日本語
Files and file uploads: $wgLocalFileRepo
A single repository structure for the local repository.
Wprowadzono w wersji:1.11.0 (r22580)
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(tablica)
Domyślna wartość:see below


Properties required for all repos

The class name for the repository. May come from the core or an extension. The core repository classes are FileRepo, LocalRepo, ForeignDBRepo. (FSRepo is also supported for backwards compatibility.)
Should be set to 'local'.
A file backend name (see $wgFileBackends ). For $wgLocalFileRepo and $wgForeignFileRepos , a name is automatically generated in Setup.php if not defined.

For all core repos

Base public URL
The number of directory levels for hash-based division of files (see $wgHashedUploadDirectory for info)
The URL for thumb.php (optional, not recommended)
Whether to skip media file transformation on parse and rely on a 404 handler instead.
Equivalent to $wgCapitalLinks , determines whether filenames implicitly start with a capital letter. The current implementation may give incorrect description page links when the local $wgCapitalLinks and initialCapital are mismatched.
May be 'paranoid' to remove all parameters from error messages, 'none' to leave the paths in unchanged, or 'simple' to replace paths with placeholders. Default for LocalRepo is 'simple'.

Domyślna wartość

This code, in Setup.php, generates a default value for $wgLocalFileRepo based on the values of other configuration settings:

if ( !$wgLocalFileRepo ) { $wgLocalFileRepo = [ 'class' => LocalRepo::class, 'name' => 'local', 'directory' => $wgUploadDirectory , 'scriptDirUrl' => $wgScriptPath , 'url' => $wgUploadBaseUrl  ? $wgUploadBaseUrl . $wgUploadPath  : $wgUploadPath, 'hashLevels' => $wgHashedUploadDirectory  ? 2 : 0, 'thumbScriptUrl' => $wgThumbnailScriptPath , 'transformVia404' => !$wgGenerateThumbnailOnParse , 'deletedDir' => $wgDeletedDirectory , 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0 ]; }

See also