Manual:$wgFileStore/ru

From mediawiki.org
This page is a translated version of the page Manual:$wgFileStore and the translation is 3% complete.
Files and file uploads: $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)
Допустимые значения:see below
Значение по умолчанию:see below

Details

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 .

Default values

Версии 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

Example

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).

См. также