Index: trunk/phase3/includes/filerepo/backend/lockmanager/DBLockManager.php |
— | — | @@ -55,7 +55,9 @@ |
56 | 56 | * @param Array $config |
57 | 57 | */ |
58 | 58 | public function __construct( array $config ) { |
59 | | - $this->dbServers = $config['dbServers']; |
| 59 | + $this->dbServers = isset( $config['dbServers'] ) |
| 60 | + ? $config['dbServers'] |
| 61 | + : array(); // likely just using 'localDBMaster' |
60 | 62 | // Sanitize dbsByBucket config to prevent PHP errors |
61 | 63 | $this->dbsByBucket = array_filter( $config['dbsByBucket'], 'is_array' ); |
62 | 64 | $this->dbsByBucket = array_values( $this->dbsByBucket ); // consecutive |
Index: trunk/phase3/includes/filerepo/backend/lockmanager/LSLockManager.php |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | */ |
280 | 280 | protected function getBucketFromKey( $path ) { |
281 | 281 | $prefix = substr( sha1( $path ), 0, 2 ); // first 2 hex chars (8 bits) |
282 | | - return intval( base_convert( $prefix, 16, 10 ) ) % count( $this->dbsByBucket ); |
| 282 | + return intval( base_convert( $prefix, 16, 10 ) ) % count( $this->srvsByBucket ); |
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php |
— | — | @@ -16,6 +16,7 @@ |
17 | 17 | * All of the library classes must be registed in $wgAutoloadClasses. |
18 | 18 | * |
19 | 19 | * @ingroup FileBackend |
| 20 | + * @since 1.19 |
20 | 21 | */ |
21 | 22 | class SwiftFileBackend extends FileBackend { |
22 | 23 | /** @var CF_Authentication */ |
— | — | @@ -650,6 +651,7 @@ |
651 | 652 | /** |
652 | 653 | * SwiftFileBackend helper class to page through object listings. |
653 | 654 | * Swift also has a listing limit of 10,000 objects for sanity. |
| 655 | + * Do not use this class from places outside SwiftFileBackend. |
654 | 656 | * |
655 | 657 | * @ingroup FileBackend |
656 | 658 | */ |