Manual:$wgFileStore

From mediawiki.org
This page is a translated version of the page Manual:$wgFileStore and the translation is 21% complete.
ファイルとファイル アップロード: $wgFileStore
File storage paths; currently used only for deleted files.
導入されたバージョン:1.7.0 (r14777)
廃止予定になったバージョン:1.17.0 (r69007)
除去されたバージョン:1.24.0 (Gerrit change 145738; git #5842d0aa)
許容される値:下記参照
既定値:下記参照

詳細

File storage paths; was last used only for deleted files.

The setting contains an array of arrays. The first index is the name of the type of file being stored (currently only 'deleted' is valid) and the second index is one of the following three keys:

  • 'directory' contains the directory on the server where the files will be saved. As of version 1.17, this is superseded by $wgDeletedDirectory .
  • 'url' contains the URL used to access the file over the internet.

If the file is private (as for deleted files) this should be null. As of version 1.23, this value is ignored.

  • 'hash' contains the number of levels of subdirectory to create under the specified directory. E.g. if you set this to 3, images will be stored in paths such as /a/b/a/Abacus.jpg (relative to the above directories).

As of version 1.17, this is superseded by $wgHashedUploadDirectory .

既定値

MediaWiki バージョン:
1.11 – 1.23

Deleted images are stored by default in "$wgUploadDirectory /deleted". $wgFileStore can be used to customize this:

The default settings are:

$wgFileStore['deleted']['directory'] = false;// Defaults to $wgUploadDirectory/deleted
$wgFileStore['deleted']['url'] = null;       // Private, so set to null
$wgFileStore['deleted']['hash'] = 3;         // 3-level subdirectory split
MediaWiki バージョン:
1.7 – 1.10

Prior to MediaWiki 1.11, deleted files are simply discarded by default; see $wgSaveDeletedFiles for how to enable storing them. To enable undeletion, the 'deleted directory' must be defined and $wgSaveDeletedFiles must be true.

The default settings are:

$wgFileStore = array();
$wgFileStore['deleted']['directory'] = null; // Don't forget to set this.
$wgFileStore['deleted']['url'] = null;       // Private
$wgFileStore['deleted']['hash'] = 3;         // 3-level subdirectory split

An example enabling saving deleted images:

$wgSaveDeletedFiles = true;                                    // Not required in MW 1.11.0 and above.
$wgFileStore['deleted']['directory'] = "$IP/imagesDeleted";
$wgFileStore['deleted']['url'] = null; 
$wgFileStore['deleted']['hash'] = 3;

The 'deleted url' can remain null (as the deleted files are private, not visible to the Internet).

関連項目