Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -11,6 +11,8 @@ |
12 | 12 | * All "containers" each map to a directory under the backend's base directory. |
13 | 13 | * For backwards-compatibility, some container paths can be set to custom paths. |
14 | 14 | * The wiki ID will not be used in any custom paths, so this should be avoided. |
| 15 | + * |
| 16 | + * Having directories with thousands of files will diminish performance. |
15 | 17 | * Sharding can be accomplished by using FileRepo-style hash paths. |
16 | 18 | * |
17 | 19 | * Status messages should avoid mentioning the internal FS paths. |
— | — | @@ -364,14 +366,13 @@ |
365 | 367 | } |
366 | 368 | // Add a .htaccess file to the root of the container... |
367 | 369 | if ( !empty( $params['noAccess'] ) ) { |
368 | | - $dirRoot = $this->resolveToFSPath( $params['dir'], '' ); |
369 | | - if ( !file_exists( "{$dirRoot}/.htaccess" ) ) { |
| 370 | + if ( !file_exists( "{$contRoot}/.htaccess" ) ) { |
370 | 371 | wfSuppressWarnings(); |
371 | 372 | $ok = file_put_contents( "{$dirRoot}/.htaccess", "Deny from all\n" ); |
372 | 373 | wfRestoreWarnings(); |
373 | 374 | if ( !$ok ) { |
374 | 375 | $storeDir = "mwstore://{$this->name}/{$shortCont}"; |
375 | | - $status->fatal( 'backend-fail-create', "$storeDir/.htaccess" ); |
| 376 | + $status->fatal( 'backend-fail-create', "{$storeDir}/.htaccess" ); |
376 | 377 | return $status; |
377 | 378 | } |
378 | 379 | } |