Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -44,6 +44,7 @@ |
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Get the public root directory of the repository. |
| 48 | + * @return string |
48 | 49 | */ |
49 | 50 | function getRootDirectory() { |
50 | 51 | return $this->directory; |
— | — | @@ -51,6 +52,7 @@ |
52 | 53 | |
53 | 54 | /** |
54 | 55 | * Get the public root URL of the repository |
| 56 | + * @return string |
55 | 57 | */ |
56 | 58 | function getRootUrl() { |
57 | 59 | return $this->url; |
— | — | @@ -58,6 +60,7 @@ |
59 | 61 | |
60 | 62 | /** |
61 | 63 | * Returns true if the repository uses a multi-level directory structure |
| 64 | + * @return string |
62 | 65 | */ |
63 | 66 | function isHashed() { |
64 | 67 | return (bool)$this->hashLevels; |
— | — | @@ -90,7 +93,7 @@ |
91 | 94 | * |
92 | 95 | * @param $zone string |
93 | 96 | * |
94 | | - * @return url |
| 97 | + * @return string url |
95 | 98 | */ |
96 | 99 | function getZoneUrl( $zone ) { |
97 | 100 | switch ( $zone ) { |
— | — | @@ -160,6 +163,7 @@ |
161 | 164 | * self::OVERWRITE Overwrite an existing destination file instead of failing |
162 | 165 | * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the |
163 | 166 | * same contents as the source |
| 167 | + * @return Status |
164 | 168 | */ |
165 | 169 | function storeBatch( $triplets, $flags = 0 ) { |
166 | 170 | wfDebug( __METHOD__ . ': Storing ' . count( $triplets ) . |
— | — | @@ -283,6 +287,7 @@ |
284 | 288 | * ignores any errors that may occur |
285 | 289 | * |
286 | 290 | * @param $pairs array List of files to delete |
| 291 | + * @return void |
287 | 292 | */ |
288 | 293 | function cleanupBatch( $files ) { |
289 | 294 | foreach ( $files as $file ) { |
— | — | @@ -307,6 +312,9 @@ |
308 | 313 | } |
309 | 314 | } |
310 | 315 | |
| 316 | + /** |
| 317 | + * @return Status |
| 318 | + */ |
311 | 319 | function append( $srcPath, $toAppendPath, $flags = 0 ) { |
312 | 320 | $status = $this->newGood(); |
313 | 321 | |
— | — | @@ -377,6 +385,7 @@ |
378 | 386 | /** |
379 | 387 | * Take all available measures to prevent web accessibility of new deleted |
380 | 388 | * directories, in case the user has not configured offline storage |
| 389 | + * @return void |
381 | 390 | */ |
382 | 391 | protected function initDeletedDir( $dir ) { |
383 | 392 | // Add a .htaccess file to the root of the deleted zone |
— | — | @@ -429,6 +438,7 @@ |
430 | 439 | * @param $triplets Array: (source,dest,archive) triplets as per publish() |
431 | 440 | * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
432 | 441 | * that the source files should be deleted if possible |
| 442 | + * @return Status |
433 | 443 | */ |
434 | 444 | function publishBatch( $triplets, $flags = 0 ) { |
435 | 445 | // Perform initial checks |
— | — | @@ -620,6 +630,7 @@ |
621 | 631 | /** |
622 | 632 | * Get a relative path for a deletion archive key, |
623 | 633 | * e.g. s/z/a/ for sza251lrxrc1jad41h5mgilp8nysje52.jpg |
| 634 | + * @return string |
624 | 635 | */ |
625 | 636 | function getDeletedHashPath( $key ) { |
626 | 637 | $path = ''; |
— | — | @@ -632,6 +643,7 @@ |
633 | 644 | /** |
634 | 645 | * Call a callback function for every file in the repository. |
635 | 646 | * Uses the filesystem even in child classes. |
| 647 | + * @return void |
636 | 648 | */ |
637 | 649 | function enumFilesInFS( $callback ) { |
638 | 650 | $numDirs = 1 << ( $this->hashLevels * 4 ); |
— | — | @@ -657,6 +669,7 @@ |
658 | 670 | /** |
659 | 671 | * Call a callback function for every file in the repository |
660 | 672 | * May use either the database or the filesystem |
| 673 | + * @return void |
661 | 674 | */ |
662 | 675 | function enumFiles( $callback ) { |
663 | 676 | $this->enumFilesInFS( $callback ); |
— | — | @@ -665,6 +678,7 @@ |
666 | 679 | /** |
667 | 680 | * Get properties of a file with a given virtual URL |
668 | 681 | * The virtual URL must refer to this repo |
| 682 | + * @return array |
669 | 683 | */ |
670 | 684 | function getFileProps( $virtualUrl ) { |
671 | 685 | $path = $this->resolveVirtualUrl( $virtualUrl ); |
— | — | @@ -706,6 +720,7 @@ |
707 | 721 | /** |
708 | 722 | * Chmod a file, supressing the warnings. |
709 | 723 | * @param $path String: the path to change |
| 724 | + * @return void |
710 | 725 | */ |
711 | 726 | protected function chmod( $path ) { |
712 | 727 | wfSuppressWarnings(); |