MediaWiki  1.23.12
FSRepo.php
Go to the documentation of this file.
1 <?php
33 class FSRepo extends FileRepo {
38  function __construct( array $info ) {
39  if ( !isset( $info['backend'] ) ) {
40  // B/C settings...
41  $directory = $info['directory'];
42  $deletedDir = isset( $info['deletedDir'] )
43  ? $info['deletedDir']
44  : false;
45  $thumbDir = isset( $info['thumbDir'] )
46  ? $info['thumbDir']
47  : "{$directory}/thumb";
48  $transcodedDir = isset( $info['transcodedDir'] )
49  ? $info['transcodedDir']
50  : "{$directory}/transcoded";
51  $fileMode = isset( $info['fileMode'] )
52  ? $info['fileMode']
53  : 0644;
54 
55  $repoName = $info['name'];
56  // Get the FS backend configuration
58  'name' => $info['name'] . '-backend',
59  'wikiId' => wfWikiID(),
60  'lockManager' => LockManagerGroup::singleton( wfWikiID() )->get( 'fsLockManager' ),
61  'containerPaths' => array(
62  "{$repoName}-public" => "{$directory}",
63  "{$repoName}-temp" => "{$directory}/temp",
64  "{$repoName}-thumb" => $thumbDir,
65  "{$repoName}-transcoded" => $transcodedDir,
66  "{$repoName}-deleted" => $deletedDir
67  ),
68  'fileMode' => $fileMode,
69  ) );
70  // Update repo config to use this backend
71  $info['backend'] = $backend;
72  }
73 
74  parent::__construct( $info );
75 
76  if ( !( $this->backend instanceof FSFileBackend ) ) {
77  throw new MWException( "FSRepo only supports FSFileBackend." );
78  }
79  }
80 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
FSRepo
A repository for files accessible via the local filesystem.
Definition: FSRepo.php:33
LockManagerGroup\singleton
static singleton( $domain=false)
Definition: LockManagerGroup.php:50
FileRepo\$backend
FileBackend $backend
Definition: FileRepo.php:50
FileRepo
Base class for file repositories.
Definition: FileRepo.php:37
MWException
MediaWiki exception.
Definition: MWException.php:26
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
wfWikiID
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
Definition: GlobalFunctions.php:3660
FSRepo\__construct
__construct(array $info)
Definition: FSRepo.php:38
FSFileBackend
Class for a file system (FS) based file backend.
Definition: FSFileBackend.php:41