From 14a1627985fab4ce41309579d025574a244d7274 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 12 Jan 2012 19:20:58 +0000 Subject: [PATCH] * Fixed a bit of bogus code left in r108740 * Added some class comments --- includes/filerepo/backend/FSFileBackend.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/filerepo/backend/FSFileBackend.php b/includes/filerepo/backend/FSFileBackend.php index ec2d7f4a89..ccbfe481b0 100644 --- a/includes/filerepo/backend/FSFileBackend.php +++ b/includes/filerepo/backend/FSFileBackend.php @@ -11,6 +11,8 @@ * All "containers" each map to a directory under the backend's base directory. * For backwards-compatibility, some container paths can be set to custom paths. * The wiki ID will not be used in any custom paths, so this should be avoided. + * + * Having directories with thousands of files will diminish performance. * Sharding can be accomplished by using FileRepo-style hash paths. * * Status messages should avoid mentioning the internal FS paths. @@ -364,14 +366,13 @@ class FSFileBackend extends FileBackend { } // Add a .htaccess file to the root of the container... if ( !empty( $params['noAccess'] ) ) { - $dirRoot = $this->resolveToFSPath( $params['dir'], '' ); - if ( !file_exists( "{$dirRoot}/.htaccess" ) ) { + if ( !file_exists( "{$contRoot}/.htaccess" ) ) { wfSuppressWarnings(); $ok = file_put_contents( "{$dirRoot}/.htaccess", "Deny from all\n" ); wfRestoreWarnings(); if ( !$ok ) { $storeDir = "mwstore://{$this->name}/{$shortCont}"; - $status->fatal( 'backend-fail-create', "$storeDir/.htaccess" ); + $status->fatal( 'backend-fail-create', "{$storeDir}/.htaccess" ); return $status; } } -- 2.20.1