FU r106752: use "media-" instead of "images-" in container names. Long live books...
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 20 Dec 2011 23:47:53 +0000 (23:47 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 20 Dec 2011 23:47:53 +0000 (23:47 +0000)
includes/Setup.php
includes/filerepo/FSRepo.php
includes/filerepo/FileRepo.php
includes/filerepo/backend/FileBackendGroup.php
tests/parser/parserTest.inc
tests/phpunit/includes/LocalFileTest.php
tests/phpunit/includes/media/ExifRotationTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php

index d842e7a..cf8c7cb 100644 (file)
@@ -240,7 +240,7 @@ function wfBackendForLegacyRepoConf( &$info ) {
        // 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(
@@ -248,10 +248,10 @@ function wfBackendForLegacyRepoConf( &$info ) {
                '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,
        );
index f33f09e..92e7295 100644 (file)
@@ -35,10 +35,10 @@ class FSRepo extends FileRepo {
                                '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,
                        ) );
@@ -47,7 +47,7 @@ class FSRepo extends FileRepo {
                        // Set "deleted" zone in repo if deletedDir is configured
                        if ( $deletedDir !== false ) {
                                $info['zones']['deleted'] = array(
-                                       'container' => 'images-deleted', 'directory' => '' );
+                                       'container' => 'media-deleted', 'directory' => '' );
                        }
                }
 
index ec0711e..4097db1 100644 (file)
@@ -89,7 +89,7 @@ class FileRepo {
                                        );
                                } else {
                                        $this->zones[$zone] = array(
-                                               'container' => "images-$zone",
+                                               'container' => "media-$zone",
                                                'directory' => '' // container root
                                        );
                                }
index a0c1e85..dc9da98 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * @file
  * @ingroup FileBackend
+ * @author Aaron Schulz
  */
 
 /**
index 37ae04f..8e40de5 100644 (file)
@@ -153,10 +153,10 @@ class ParserTest {
                        '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(
@@ -167,7 +167,7 @@ class ParserTest {
                        'transformVia404' => false,
                        'backend'         => $backend,
                        'zones'           => array( 'deleted' => array(
-                               'container' => 'images-deleted', 'directory' => '' ) )
+                               'container' => 'media-deleted', 'directory' => '' ) )
                );
                $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
                $wgNamespaceAliases['Image'] = NS_FILE;
index cae2e10..c0982d2 100644 (file)
@@ -54,17 +54,17 @@ class LocalFileTest extends MediaWikiTestCase {
        }
 
        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() {
index 6cabd9a..592b193 100644 (file)
@@ -13,7 +13,7 @@ class ExifRotationTest extends MediaWikiTestCase {
                $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',
index a939e91..4bf428d 100644 (file)
@@ -321,8 +321,8 @@ class NewParserTest extends MediaWikiTestCase {
                        '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 ) );
 
index 92a00d2..e9c1963 100644 (file)
@@ -30,10 +30,10 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                        '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(
@@ -44,7 +44,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                        'transformVia404' => false,
                        'backend'         => $backend,
                        'zones'           => array( 'deleted' => array(
-                               'container' => 'images-deleted', 'directory' => '' ) )
+                               'container' => 'media-deleted', 'directory' => '' ) )
                );
                $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
                $wgNamespaceAliases['Image'] = NS_FILE;