// Disable "deleted" zone in repo config if deleted dir not set
if ( $deletedDir !== false ) {
$info['zones']['deleted'] = array(
- 'container' => 'images-deleted', 'directory' => '' );
+ 'container' => 'media-deleted', 'directory' => '' );
}
// Get the FS backend configuration
return array(
'class' => 'FSFileBackend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- "images-public" => "{$directory}",
- "images-temp" => "{$directory}/temp",
- "images-thumb" => $thumbDir,
- "images-deleted" => $deletedDir
+ "media-public" => "{$directory}",
+ "media-temp" => "{$directory}/temp",
+ "media-thumb" => $thumbDir,
+ "media-deleted" => $deletedDir
),
'fileMode' => $fileMode,
);
'name' => $info['name'] . '-backend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- "images-public" => "{$directory}",
- "images-temp" => "{$directory}/temp",
- "images-thumb" => $thumbDir,
- "images-deleted" => $deletedDir
+ "media-public" => "{$directory}",
+ "media-temp" => "{$directory}/temp",
+ "media-thumb" => $thumbDir,
+ "media-deleted" => $deletedDir
),
'fileMode' => $fileMode,
) );
// Set "deleted" zone in repo if deletedDir is configured
if ( $deletedDir !== false ) {
$info['zones']['deleted'] = array(
- 'container' => 'images-deleted', 'directory' => '' );
+ 'container' => 'media-deleted', 'directory' => '' );
}
}
);
} else {
$this->zones[$zone] = array(
- 'container' => "images-$zone",
+ 'container' => "media-$zone",
'directory' => '' // container root
);
}
/**
* @file
* @ingroup FileBackend
+ * @author Aaron Schulz
*/
/**
'name' => 'local-backend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- 'images-public' => wfTempDir() . '/test-repo/public',
- 'images-thumb' => wfTempDir() . '/test-repo/thumb',
- 'images-temp' => wfTempDir() . '/test-repo/temp',
- 'images-deleted' => wfTempDir() . '/test-repo/delete',
+ 'media-public' => wfTempDir() . '/test-repo/public',
+ 'media-thumb' => wfTempDir() . '/test-repo/thumb',
+ 'media-temp' => wfTempDir() . '/test-repo/temp',
+ 'media-deleted' => wfTempDir() . '/test-repo/delete',
)
) );
$wgLocalFileRepo = array(
'transformVia404' => false,
'backend' => $backend,
'zones' => array( 'deleted' => array(
- 'container' => 'images-deleted', 'directory' => '' ) )
+ 'container' => 'media-deleted', 'directory' => '' ) )
);
$wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
$wgNamespaceAliases['Image'] = NS_FILE;
}
function testGetArchivePath() {
- $this->assertEquals( 'mwstore://local-backend/images-public/archive', $this->file_hl0->getArchivePath() );
- $this->assertEquals( 'mwstore://local-backend/images-public/archive/a/a2', $this->file_hl2->getArchivePath() );
- $this->assertEquals( 'mwstore://local-backend/images-public/archive/!', $this->file_hl0->getArchivePath( '!' ) );
- $this->assertEquals( 'mwstore://local-backend/images-public/archive/a/a2/!', $this->file_hl2->getArchivePath( '!' ) );
+ $this->assertEquals( 'mwstore://local-backend/media-public/archive', $this->file_hl0->getArchivePath() );
+ $this->assertEquals( 'mwstore://local-backend/media-public/archive/a/a2', $this->file_hl2->getArchivePath() );
+ $this->assertEquals( 'mwstore://local-backend/media-public/archive/!', $this->file_hl0->getArchivePath( '!' ) );
+ $this->assertEquals( 'mwstore://local-backend/media-public/archive/a/a2/!', $this->file_hl2->getArchivePath( '!' ) );
}
function testGetThumbPath() {
- $this->assertEquals( 'mwstore://local-backend/images-thumb/Test!', $this->file_hl0->getThumbPath() );
- $this->assertEquals( 'mwstore://local-backend/images-thumb/a/a2/Test!', $this->file_hl2->getThumbPath() );
- $this->assertEquals( 'mwstore://local-backend/images-thumb/Test!/x', $this->file_hl0->getThumbPath( 'x' ) );
- $this->assertEquals( 'mwstore://local-backend/images-thumb/a/a2/Test!/x', $this->file_hl2->getThumbPath( 'x' ) );
+ $this->assertEquals( 'mwstore://local-backend/media-thumb/Test!', $this->file_hl0->getThumbPath() );
+ $this->assertEquals( 'mwstore://local-backend/media-thumb/a/a2/Test!', $this->file_hl2->getThumbPath() );
+ $this->assertEquals( 'mwstore://local-backend/media-thumb/Test!/x', $this->file_hl0->getThumbPath( 'x' ) );
+ $this->assertEquals( 'mwstore://local-backend/media-thumb/a/a2/Test!/x', $this->file_hl2->getThumbPath( 'x' ) );
}
function testGetArchiveUrl() {
$this->backend = new FSFileBackend( array(
'name' => 'localtesting',
'lockManager' => 'nullLockManager',
- 'containerPaths' => array( 'images-thumb' => $tmpDir, 'data' => $filePath )
+ 'containerPaths' => array( 'media-thumb' => $tmpDir, 'data' => $filePath )
) );
$this->repo = new FSRepo( array(
'name' => 'temp',
'class' => 'FSFileBackend',
'lockManager' => 'nullLockManager',
'containerPaths' => array(
- 'images-public' => $this->uploadDir,
- 'images-thumb' => $this->uploadDir . '/thumb' )
+ 'media-public' => $this->uploadDir,
+ 'media-thumb' => $this->uploadDir . '/thumb' )
);
FileBackendGroup::singleton()->register( array( $backend ) );
'name' => 'local-backend',
'lockManager' => 'fsLockManager',
'containerPaths' => array(
- 'images-public' => wfTempDir() . '/test-repo/public',
- 'images-thumb' => wfTempDir() . '/test-repo/thumb',
- 'images-temp' => wfTempDir() . '/test-repo/temp',
- 'images-deleted' => wfTempDir() . '/test-repo/delete',
+ 'media-public' => wfTempDir() . '/test-repo/public',
+ 'media-thumb' => wfTempDir() . '/test-repo/thumb',
+ 'media-temp' => wfTempDir() . '/test-repo/temp',
+ 'media-deleted' => wfTempDir() . '/test-repo/delete',
)
) );
$wgLocalFileRepo = array(
'transformVia404' => false,
'backend' => $backend,
'zones' => array( 'deleted' => array(
- 'container' => 'images-deleted', 'directory' => '' ) )
+ 'container' => 'media-deleted', 'directory' => '' ) )
);
$wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
$wgNamespaceAliases['Image'] = NS_FILE;