https://www.mediawiki.org/wiki/Special:Code/MediaWiki/105023

Revision: 105023
Author:   aaron
Date:     2011-12-02 23:08:57 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
* Changed default FileRepo container names to have 'images-'
* Updated outdated comment

Modified Paths:
--------------
    branches/FileBackend/phase3/includes/Setup.php
    branches/FileBackend/phase3/includes/filerepo/FileRepo.php
    branches/FileBackend/phase3/includes/filerepo/backend/LockManager.php

Modified: branches/FileBackend/phase3/includes/Setup.php
===================================================================
--- branches/FileBackend/phase3/includes/Setup.php      2011-12-02 23:01:21 UTC 
(rev 105022)
+++ branches/FileBackend/phase3/includes/Setup.php      2011-12-02 23:08:57 UTC 
(rev 105023)
@@ -232,7 +232,8 @@
        $info['backend'] = $backendName;
        // Disable "deleted" zone in repo config if deleted dir not set
        if ( $deletedDir !== false ) {
-               $info['zones']['deleted'] = array( 'container' => 'deleted', 
'directory' => '' );
+               $info['zones']['deleted'] = array(
+                       'container' => 'images-deleted', 'directory' => '' );
        }
        // Get the FS backend configuration
        return array(
@@ -240,10 +241,10 @@
                'class'          => 'FSFileBackend',
                'lockManager'    => 'fsLockManager',
                'containerPaths' => array(
-                       "public"  => "{$directory}",
-                       "temp"    => "{$directory}/temp",
-                       "thumb"   => $thumbDir,
-                       "deleted" => $deletedDir
+                       "images-public"  => "{$directory}",
+                       "images-temp"    => "{$directory}/temp",
+                       "images-thumb"   => $thumbDir,
+                       "images-deleted" => $deletedDir
                ),
                'fileMode'       => $fileMode,
        );

Modified: branches/FileBackend/phase3/includes/filerepo/FileRepo.php
===================================================================
--- branches/FileBackend/phase3/includes/filerepo/FileRepo.php  2011-12-02 
23:01:21 UTC (rev 105022)
+++ branches/FileBackend/phase3/includes/filerepo/FileRepo.php  2011-12-02 
23:08:57 UTC (rev 105023)
@@ -85,7 +85,7 @@
                                        );
                                } else {
                                        $this->zones[$zone] = array(
-                                               'container' => $zone,
+                                               'container' => "images-$zone",
                                                'directory' => '' // container 
root
                                        );
                                }

Modified: branches/FileBackend/phase3/includes/filerepo/backend/LockManager.php
===================================================================
--- branches/FileBackend/phase3/includes/filerepo/backend/LockManager.php       
2011-12-02 23:01:21 UTC (rev 105022)
+++ branches/FileBackend/phase3/includes/filerepo/backend/LockManager.php       
2011-12-02 23:08:57 UTC (rev 105023)
@@ -335,10 +335,7 @@
                $lockedKeys = array(); // files locked in this attempt
                // Attempt to acquire these locks...
                foreach ( $keysToLock as $bucket => $keys ) {
-                       // Acquire the locks for this server. Three main cases 
can happen:
-                       // (a) First server is up; common case
-                       // (b) First server is down but a peer is up
-                       // (c) First server is down and no peer are up (or none 
defined)
+                       // Try to acquire the locks for this bucket
                        $res = $this->doLockingQueryAll( $bucket, $keys, $type 
);
                        if ( $res === 'cantacquire' ) {
                                // Resources already locked by another process.


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to