r108744 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108743‎ | r108744 | r108745 >
Date:19:20, 12 January 2012
Author:aaron
Status:ok
Tags:
Comment:
* Fixed a bit of bogus code left in r108740
* Added some class comments
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FSFileBackend.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php
@@ -11,6 +11,8 @@
1212 * All "containers" each map to a directory under the backend's base directory.
1313 * For backwards-compatibility, some container paths can be set to custom paths.
1414 * 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.
1517 * Sharding can be accomplished by using FileRepo-style hash paths.
1618 *
1719 * Status messages should avoid mentioning the internal FS paths.
@@ -364,14 +366,13 @@
365367 }
366368 // Add a .htaccess file to the root of the container...
367369 if ( !empty( $params['noAccess'] ) ) {
368 - $dirRoot = $this->resolveToFSPath( $params['dir'], '' );
369 - if ( !file_exists( "{$dirRoot}/.htaccess" ) ) {
 370+ if ( !file_exists( "{$contRoot}/.htaccess" ) ) {
370371 wfSuppressWarnings();
371372 $ok = file_put_contents( "{$dirRoot}/.htaccess", "Deny from all\n" );
372373 wfRestoreWarnings();
373374 if ( !$ok ) {
374375 $storeDir = "mwstore://{$this->name}/{$shortCont}";
375 - $status->fatal( 'backend-fail-create', "$storeDir/.htaccess" );
 376+ $status->fatal( 'backend-fail-create', "{$storeDir}/.htaccess" );
376377 return $status;
377378 }
378379 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108740* Added 'basePath' config param to FSFileBackend and tweaked it to behave mor...aaron18:44, 12 January 2012

Status & tagging log