Uploads : $wgLocalFileRepo
A single repository structure for the local repository.
導入されたバージョン:
1.11.0 (r22580 )
除去されたバージョン:
使用中
可能な値:
配列
既定値:
下記参照
他の設定: アルファベット順 | 機能順
詳細
重要: このページの内容は古いものです。 このページの確認を更新した場合、かつ内容が適切だと思える場合は、このお知らせを除去してください。
すべてのリポジトリに必須のプロパティ
class
リポジトリのクラス名。 May come from the core or an extension. The core repository classes are FileRepo, LocalRepo, ForeignDBRepo. (FSRepo is also supported for backwards compatibility.)
name
Should be set to 'local'
.
backend
A file backend name (see $wgFileBackends Manual:$wgFileBackends ). For $wgLocalFileRepo and $wgForeignFileRepos Manual:$wgForeignFileRepos , a name is automatically generated in Setup.php Manual:Setup.php if not defined.
For all core repos
url
Base public URL
hashLevels
The number of directory levels for hash-based division of files (see $wgHashedUploadDirectory
for info)
thumbScriptUrl
The URL for thumb.php (optional, not recommended)
transformVia404
Whether to skip media file transformation on parse and rely on a 404 handler instead.
initialCapital
Equivalent to $wgCapitalLinks Manual:$wgCapitalLinks , determines whether filenames implicitly start with a capital letter. The current implementation may give incorrect description page links when the local $wgCapitalLinks Manual:$wgCapitalLinks and initialCapital are mismatched.
pathDisclosureProtection
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'.
既定値
This code, in Setup.php, generates a default value for $wgLocalFileRepo based on the values of other configuration settings:
if ( !$wgLocalFileRepo ) {
if ( isset( $wgFileStore Manual:$wgFileStore ['deleted']['hash'] ) ) {
$deletedHashLevel = $wgFileStore Manual:$wgFileStore ['deleted']['hash'];
} else {
$deletedHashLevel = $wgHashedUploadDirectory Manual:$wgHashedUploadDirectory ? 3 : 0;
}
$wgLocalFileRepo = array(
'class' => 'LocalRepo',
'name' => 'local',
'directory' => $wgUploadDirectory Manual:$wgUploadDirectory ,
'scriptDirUrl' => $wgScriptPath Manual:$wgScriptPath ,
'scriptExtension' => $wgScriptExtension Manual:$wgScriptExtension ,
'url' => $wgUploadBaseUrl Manual:$wgUploadBaseUrl ? $wgUploadBaseUrl Manual:$wgUploadBaseUrl . $wgUploadPath Manual:$wgUploadPath : $wgUploadPath Manual:$wgUploadPath ,
'hashLevels' => $wgHashedUploadDirectory Manual:$wgHashedUploadDirectory ? 2 : 0,
'thumbScriptUrl' => $wgThumbnailScriptPath Manual:$wgThumbnailScriptPath ,
'transformVia404' => !$wgGenerateThumbnailOnParse Manual:$wgGenerateThumbnailOnParse ,
'deletedDir' => $wgDeletedDirectory Manual:$wgDeletedDirectory ,
'deletedHashLevels' => $deletedHashLevel
);
}
関連項目