Jump to content

Manual:$wgFileBackends/pl

From mediawiki.org
This page is a translated version of the page Manual:$wgFileBackends and the translation is 4% complete.
Files and file uploads: $wgFileBackends
File backend structure configuration.
Wprowadzono w wersji:1.19.0
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(array)
Domyślna wartość:[]
(FSFileBackend is registered in another way)

Details

This is an array of file backend configuration arrays. Each backend configuration has the following parameters:

name
A unique name for the backend
class
The file backend class to use
wikiId
A unique string that identifies the wiki (container prefix)
lockManager
The name of a lock manager (see $wgLockManagers )
Additional parameters are specific to the class used.

Uwagi

Taken from DefaultSettings.php

There are two particularly important aspects about each backend:

  1. Whether it is fully qualified or wiki-relative.


By default, the paths of files are relative to the current wiki, which works via prefixing them with the current wiki ID when accessed. Setting 'wikiId' forces the backend to be fully qualified by prefixing all paths with the specified value instead. This can be useful if multiple wikis need to share the same data. Note that 'name' is not part of any prefix and thus should not be relied upon for namespacing.

  1. Whether it is only defined for some wikis or is defined on all wikis in the wiki farm. Defining a backend globally is useful if multiple wikis need to share the same data.

One should be aware of these aspects when configuring a backend for use with any basic feature or plugin. For example, suppose an extension stores data for different wikis in different directories and sometimes needs to access data from a foreign wiki's directory in order to render a page on given wiki. The extension would need a fully qualified backend that is defined on all wikis in the wiki farm.