Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackendMultiWrite.php |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * @file |
5 | | - * @ingroup FileRepo |
6 | 5 | * @ingroup FileBackend |
7 | 6 | */ |
8 | 7 | |
— | — | @@ -27,7 +26,6 @@ |
28 | 27 | * |
29 | 28 | * Non-persistent backends used for caching must be declared. |
30 | 29 | * |
31 | | - * @ingroup FileRepo |
32 | 30 | * @ingroup FileBackend |
33 | 31 | */ |
34 | 32 | class FileBackendMultiWrite extends FileBackendBase { |
Index: branches/FileBackend/phase3/includes/filerepo/backend/FileOp.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * @file |
5 | | - * @ingroup FileRepo |
| 5 | + * @ingroup FileBackend |
6 | 6 | */ |
7 | 7 | |
8 | 8 | /** |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | * |
12 | 12 | * Access use of large fields should be avoided as we want to be able to support |
13 | 13 | * potentially many FileOp classes in large arrays in memory. |
| 14 | + * |
| 15 | + * @ingroup FileBackend |
14 | 16 | */ |
15 | 17 | abstract class FileOp { |
16 | 18 | /** $var Array */ |
— | — | @@ -188,7 +190,7 @@ |
189 | 191 | } |
190 | 192 | |
191 | 193 | /** |
192 | | - * Backup any file at the destination to a temporary file. |
| 194 | + * Backup the file at the destination to a temporary file. |
193 | 195 | * Don't bother backing it up unless we might overwrite the file. |
194 | 196 | * This assumes that the destination is in the backend and that |
195 | 197 | * the source is either in the backend or on the file system. |
— | — | @@ -635,7 +637,7 @@ |
636 | 638 | /** |
637 | 639 | * Combines files from severals storage paths into a new file in the backend. |
638 | 640 | * Parameters similar to FileBackend::concatenate(), which include: |
639 | | - * sources : ordered source storage paths (e.g. chunk1, chunk2, ...) |
| 641 | + * srcs : ordered source storage paths (e.g. chunk1, chunk2, ...) |
640 | 642 | * dst : destination storage path |
641 | 643 | * overwriteDest : do nothing and pass if an identical file exists at destination |
642 | 644 | */ |
— | — | @@ -654,7 +656,7 @@ |
655 | 657 | $this->checkDest = false; |
656 | 658 | } |
657 | 659 | // Check that source files exists |
658 | | - foreach ( $this->params['sources'] as $source ) { |
| 660 | + foreach ( $this->params['srcs'] as $source ) { |
659 | 661 | if ( !$this->fileExists( $source, $predicates ) ) { |
660 | 662 | $status->fatal( 'backend-fail-notexists', $source ); |
661 | 663 | return $status; |
— | — | @@ -696,7 +698,7 @@ |
697 | 699 | } |
698 | 700 | |
699 | 701 | function storagePathsUsed() { |
700 | | - return array_merge( $this->params['sources'], $this->params['dst'] ); |
| 702 | + return array_merge( $this->params['srcs'], $this->params['dst'] ); |
701 | 703 | } |
702 | 704 | } |
703 | 705 | |
Index: branches/FileBackend/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * @file |
5 | | - * @ingroup FileRepo |
6 | 5 | * @ingroup FileBackend |
7 | 6 | */ |
8 | 7 | |
— | — | @@ -10,7 +9,6 @@ |
11 | 10 | * Status messages should avoid mentioning the internal FS paths. |
12 | 11 | * Likewise, error suppression should be used to path disclosure. |
13 | 12 | * |
14 | | - * @ingroup FileRepo |
15 | 13 | * @ingroup FileBackend |
16 | 14 | */ |
17 | 15 | class FSFileBackend extends FileBackend { |
— | — | @@ -201,7 +199,7 @@ |
202 | 200 | $status->fatal( 'backend-fail-opentemp', $tmpPath ); |
203 | 201 | return $status; |
204 | 202 | } |
205 | | - foreach ( $params['sources'] as $virtualSource ) { |
| 203 | + foreach ( $params['srcs'] as $virtualSource ) { |
206 | 204 | list( $c, $source ) = $this->resolveStoragePath( $virtualSource ); |
207 | 205 | if ( $source === null ) { |
208 | 206 | $status->fatal( 'backend-fail-invalidpath', $virtualSource ); |
— | — | @@ -449,7 +447,7 @@ |
450 | 448 | $i = strrpos( $source, '.' ); |
451 | 449 | $ext = strtolower( $i ? substr( $source, $i + 1 ) : '' ); |
452 | 450 | // Create a new temporary file... |
453 | | - $tmpFile = TempFSFile::factory( 'localcopy', $ext ); |
| 451 | + $tmpFile = TempFSFile::factory( 'localcopy_', $ext ); |
454 | 452 | if ( !$tmpFile ) { |
455 | 453 | return null; |
456 | 454 | } |
Index: branches/FileBackend/phase3/includes/filerepo/backend/LockManagerGroup.php |
— | — | @@ -1,6 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * Class to handle file lock manager registration |
| 5 | + * |
| 6 | + * @ingroup FileBackend |
5 | 7 | */ |
6 | 8 | class LockManagerGroup { |
7 | 9 | protected static $instance = null; |
Index: branches/FileBackend/phase3/includes/filerepo/backend/LockManager.php |
— | — | @@ -7,6 +7,8 @@ |
8 | 8 | * This can reduce hits to external resources for lock()/unlock() calls. |
9 | 9 | * |
10 | 10 | * Subclasses should avoid throwing exceptions at all costs. |
| 11 | + * |
| 12 | + * @ingroup FileBackend |
11 | 13 | */ |
12 | 14 | abstract class LockManager { |
13 | 15 | /* Lock types; stronger locks have high values */ |
Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackendGroup.php |
— | — | @@ -1,14 +1,12 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * @file |
5 | | - * @ingroup FileRepo |
6 | 5 | * @ingroup FileBackend |
7 | 6 | */ |
8 | 7 | |
9 | 8 | /** |
10 | 9 | * Class to handle file backend registration |
11 | 10 | * |
12 | | - * @ingroup FileRepo |
13 | 11 | * @ingroup FileBackend |
14 | 12 | */ |
15 | 13 | class FileBackendGroup { |
Index: branches/FileBackend/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | 4 | * @file |
5 | | - * @ingroup FileRepo |
6 | 5 | * @ingroup FileBackend |
7 | 6 | */ |
8 | 7 | |
— | — | @@ -18,7 +17,6 @@ |
19 | 18 | * Methods should avoid throwing exceptions at all costs. |
20 | 19 | * As a corollary, external dependencies should be kept to a minimum. |
21 | 20 | * |
22 | | - * @ingroup FileRepo |
23 | 21 | * @ingroup FileBackend |
24 | 22 | */ |
25 | 23 | abstract class FileBackendBase { |
— | — | @@ -246,7 +244,6 @@ |
247 | 245 | * Base class for all single-write backends. |
248 | 246 | * This class defines the methods as abstract that subclasses must implement. |
249 | 247 | * |
250 | | - * @ingroup FileRepo |
251 | 248 | * @ingroup FileBackend |
252 | 249 | */ |
253 | 250 | abstract class FileBackend extends FileBackendBase { |
— | — | @@ -307,7 +304,7 @@ |
308 | 305 | * Combines files from severals storage paths into a new file in the backend. |
309 | 306 | * Do not call this function from places outside FileBackend and FileOp. |
310 | 307 | * $params include: |
311 | | - * sources : ordered source storage paths (e.g. chunk1, chunk2, ...) |
| 308 | + * srcs : ordered source storage paths (e.g. chunk1, chunk2, ...) |
312 | 309 | * dst : destination storage path |
313 | 310 | * overwriteDest : do nothing and pass if an identical file exists at destination |
314 | 311 | * |
— | — | @@ -570,7 +567,7 @@ |
571 | 568 | if ( |
572 | 569 | $path === '.' || |
573 | 570 | $path === '..' || |
574 | | - strpos( $path, './' ) === 0 || |
| 571 | + strpos( $path, './' ) === 0 || |
575 | 572 | strpos( $path, '../' ) === 0 || |
576 | 573 | strpos( $path, '/./' ) !== false || |
577 | 574 | strpos( $path, '/../' ) !== false |
Index: branches/FileBackend/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -797,7 +797,7 @@ |
798 | 798 | |
799 | 799 | // Concatenate the chunks into one file |
800 | 800 | $op = array( 'op' => 'concatenate', |
801 | | - 'sources' => $sources, 'dst' => $dest, 'overwriteDest' => true ); |
| 801 | + 'srcs' => $sources, 'dst' => $dest, 'overwriteDest' => true ); |
802 | 802 | $status->merge( $this->backend->doOperation( $op ) ); |
803 | 803 | if ( !$status->isOK() ) { |
804 | 804 | return $status; |
Index: branches/FileBackend/phase3/img_auth.php |
— | — | @@ -91,7 +91,6 @@ |
92 | 92 | } |
93 | 93 | |
94 | 94 | // Check to see if the file exists |
95 | | - var_dump($filename); |
96 | 95 | if ( !$repo->fileExists( $filename, FileRepo::FILES_ONLY ) ) { |
97 | 96 | wfForbidden( 'img-auth-accessdenied','img-auth-nofile', $filename ); |
98 | 97 | return; |