Index: trunk/phase3/includes/filerepo/OldLocalFile.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | * @param $title Title |
75 | 75 | * @param $repo FileRepo |
76 | 76 | * @param $time String: timestamp or null to load by archive name |
77 | | - * @param $archiveNameString: archive name or null to load by timestamp |
| 77 | + * @param $archiveName String: archive name or null to load by timestamp |
78 | 78 | */ |
79 | 79 | function __construct( $title, $repo, $time, $archiveName ) { |
80 | 80 | parent::__construct( $title, $repo ); |
Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -747,7 +747,8 @@ |
748 | 748 | * @param $props Array: File properties, if known. This can be used to reduce the |
749 | 749 | * upload time when uploading virtual URLs for which the file info |
750 | 750 | * is already known |
751 | | - * @param string $timestamp Timestamp for img_timestamp, or false to use the current time |
| 751 | + * @param $timestamp String: timestamp for img_timestamp, or false to use the current time |
| 752 | + * @param $user Mixed: User object or null to use $wgUser |
752 | 753 | * |
753 | 754 | * @return FileRepoStatus object. On success, the value member contains the |
754 | 755 | * archive name, or an empty string if it was a new file. |
— | — | @@ -954,7 +955,7 @@ |
955 | 956 | * The archive name should be passed through to recordUpload for database |
956 | 957 | * registration. |
957 | 958 | * |
958 | | - * @param $sourcePath String: local filesystem path to the source image |
| 959 | + * @param $srcPath String: local filesystem path to the source image |
959 | 960 | * @param $flags Integer: a bitwise combination of: |
960 | 961 | * File::DELETE_SOURCE Delete the source file, i.e. move |
961 | 962 | * rather than copy |
Index: trunk/phase3/includes/filerepo/FSRepo.php |
— | — | @@ -132,8 +132,8 @@ |
133 | 133 | /** |
134 | 134 | * Store a batch of files |
135 | 135 | * |
136 | | - * @param array $triplets (src,zone,dest) triplets as per store() |
137 | | - * @param integer $flags Bitwise combination of the following flags: |
| 136 | + * @param $triplets Array: (src,zone,dest) triplets as per store() |
| 137 | + * @param $flags Integer: bitwise combination of the following flags: |
138 | 138 | * self::DELETE_SOURCE Delete the source file after upload |
139 | 139 | * self::OVERWRITE Overwrite an existing destination file instead of failing |
140 | 140 | * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the |
— | — | @@ -267,8 +267,8 @@ |
268 | 268 | /** |
269 | 269 | * Checks existence of specified array of files. |
270 | 270 | * |
271 | | - * @param array $files URLs of files to check |
272 | | - * @param integer $flags Bitwise combination of the following flags: |
| 271 | + * @param $files Array: URLs of files to check |
| 272 | + * @param $flags Integer: bitwise combination of the following flags: |
273 | 273 | * self::FILES_ONLY Mark file as existing only if it is a file (not directory) |
274 | 274 | * @return Either array of files and existence flags, or false |
275 | 275 | */ |
— | — | @@ -307,9 +307,9 @@ |
308 | 308 | |
309 | 309 | /** |
310 | 310 | * Pick a random name in the temp zone and store a file to it. |
311 | | - * @param string $originalName The base name of the file as specified |
| 311 | + * @param $originalName String: the base name of the file as specified |
312 | 312 | * by the user. The file extension will be maintained. |
313 | | - * @param string $srcPath The current location of the file. |
| 313 | + * @param $srcPath String: the current location of the file. |
314 | 314 | * @return FileRepoStatus object with the URL in the value. |
315 | 315 | */ |
316 | 316 | function storeTemp( $originalName, $srcPath ) { |
— | — | @@ -325,8 +325,8 @@ |
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Remove a temporary file or mark it for garbage collection |
329 | | - * @param string $virtualUrl The virtual URL returned by storeTemp |
330 | | - * @return boolean True on success, false on failure |
| 329 | + * @param $virtualUrl String: the virtual URL returned by storeTemp |
| 330 | + * @return Boolean: true on success, false on failure |
331 | 331 | */ |
332 | 332 | function freeTemp( $virtualUrl ) { |
333 | 333 | $temp = "mwrepo://{$this->name}/temp"; |
— | — | @@ -343,8 +343,8 @@ |
344 | 344 | |
345 | 345 | /** |
346 | 346 | * Publish a batch of files |
347 | | - * @param array $triplets (source,dest,archive) triplets as per publish() |
348 | | - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate |
| 347 | + * @param $triplets Array: (source,dest,archive) triplets as per publish() |
| 348 | + * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
349 | 349 | * that the source files should be deleted if possible |
350 | 350 | */ |
351 | 351 | function publishBatch( $triplets, $flags = 0 ) { |
— | — | @@ -454,7 +454,7 @@ |
455 | 455 | * If no valid deletion archive is configured, this may either delete the |
456 | 456 | * file or throw an exception, depending on the preference of the repository. |
457 | 457 | * |
458 | | - * @param array $sourceDestPairs Array of source/destination pairs. Each element |
| 458 | + * @param $sourceDestPairs Array of source/destination pairs. Each element |
459 | 459 | * is a two-element array containing the source file path relative to the |
460 | 460 | * public root in the first element, and the archive file path relative |
461 | 461 | * to the deleted zone root in the second element. |
— | — | @@ -615,7 +615,7 @@ |
616 | 616 | |
617 | 617 | /** |
618 | 618 | * Chmod a file, supressing the warnings. |
619 | | - * @param String $path The path to change |
| 619 | + * @param $path String: the path to change |
620 | 620 | */ |
621 | 621 | protected function chmod( $path ) { |
622 | 622 | wfSuppressWarnings(); |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -49,12 +49,13 @@ |
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Create a new File object from the local repository |
53 | | - * @param mixed $title Title object or string |
54 | | - * @param mixed $time Time at which the image was uploaded. |
55 | | - * If this is specified, the returned object will be an |
56 | | - * instance of the repository's old file class instead of |
57 | | - * a current file. Repositories not supporting version |
58 | | - * control should return false if this parameter is set. |
| 53 | + * |
| 54 | + * @param $title Mixed: Title object or string |
| 55 | + * @param $time Mixed: Time at which the image was uploaded. |
| 56 | + * If this is specified, the returned object will be an |
| 57 | + * instance of the repository's old file class instead of a |
| 58 | + * current file. Repositories not supporting version control |
| 59 | + * should return false if this parameter is set. |
59 | 60 | */ |
60 | 61 | function newFile( $title, $time = false ) { |
61 | 62 | if ( !($title instanceof Title) ) { |
— | — | @@ -79,7 +80,7 @@ |
80 | 81 | * Returns false if the file does not exist. Repositories not supporting |
81 | 82 | * version control should return false if the time is specified. |
82 | 83 | * |
83 | | - * @param mixed $title Title object or string |
| 84 | + * @param $title Mixed: Title object or string |
84 | 85 | * @param $options Associative array of options: |
85 | 86 | * time: requested time for an archived image, or false for the |
86 | 87 | * current version. An image object will be returned which was |
— | — | @@ -144,7 +145,7 @@ |
145 | 146 | |
146 | 147 | /* |
147 | 148 | * Find many files at once. |
148 | | - * @param array $items, an array of titles, or an array of findFile() options with |
| 149 | + * @param $items An array of titles, or an array of findFile() options with |
149 | 150 | * the "title" option giving the title. Example: |
150 | 151 | * |
151 | 152 | * $findItem = array( 'title' => $title, 'private' => true ); |
— | — | @@ -171,12 +172,12 @@ |
172 | 173 | |
173 | 174 | /** |
174 | 175 | * Create a new File object from the local repository |
175 | | - * @param mixed $sha1 SHA-1 key |
176 | | - * @param mixed $time Time at which the image was uploaded. |
177 | | - * If this is specified, the returned object will be an |
178 | | - * instance of the repository's old file class instead of |
179 | | - * a current file. Repositories not supporting version |
180 | | - * control should return false if this parameter is set. |
| 176 | + * @param $sha1 Mixed: SHA-1 key |
| 177 | + * @param $time Mixed: time at which the image was uploaded. |
| 178 | + * If this is specified, the returned object will be an |
| 179 | + * of the repository's old file class instead of a current |
| 180 | + * file. Repositories not supporting version control should |
| 181 | + * return false if this parameter is set. |
181 | 182 | */ |
182 | 183 | function newFileFromKey( $sha1, $time = false ) { |
183 | 184 | if ( $time ) { |
— | — | @@ -195,8 +196,8 @@ |
196 | 197 | * Returns false if the file does not exist. Repositories not supporting |
197 | 198 | * version control should return false if the time is specified. |
198 | 199 | * |
199 | | - * @param string $sha1 string |
200 | | - * @param array $options Option array, same as findFile(). |
| 200 | + * @param $sha1 String |
| 201 | + * @param $options Option array, same as findFile(). |
201 | 202 | */ |
202 | 203 | function findFileFromKey( $sha1, $options = array() ) { |
203 | 204 | if ( !is_array( $options ) ) { |
— | — | @@ -237,7 +238,7 @@ |
238 | 239 | |
239 | 240 | /** |
240 | 241 | * Get the URL corresponding to one of the four basic zones |
241 | | - * @param String $zone One of: public, deleted, temp, thumb |
| 242 | + * @param $zone String: one of: public, deleted, temp, thumb |
242 | 243 | * @return String or false |
243 | 244 | */ |
244 | 245 | function getZoneUrl( $zone ) { |
— | — | @@ -336,8 +337,8 @@ |
337 | 338 | * MediaWiki this means action=render. This should only be called by the |
338 | 339 | * repository's file class, since it may return invalid results. User code |
339 | 340 | * should use File::getDescriptionText(). |
340 | | - * @param string $name Name of image to fetch |
341 | | - * @param string $lang Language to fetch it in, if any. |
| 341 | + * @param $name String: name of image to fetch |
| 342 | + * @param $lang String: language to fetch it in, if any. |
342 | 343 | */ |
343 | 344 | function getDescriptionRenderUrl( $name, $lang = null ) { |
344 | 345 | $query = 'action=render'; |
— | — | @@ -361,10 +362,10 @@ |
362 | 363 | /** |
363 | 364 | * Store a file to a given destination. |
364 | 365 | * |
365 | | - * @param string $srcPath Source path or virtual URL |
366 | | - * @param string $dstZone Destination zone |
367 | | - * @param string $dstRel Destination relative path |
368 | | - * @param integer $flags Bitwise combination of the following flags: |
| 366 | + * @param $srcPath String: source path or virtual URL |
| 367 | + * @param $dstZone String: destination zone |
| 368 | + * @param $dstRel String: destination relative path |
| 369 | + * @param $flags Integer: bitwise combination of the following flags: |
369 | 370 | * self::DELETE_SOURCE Delete the source file after upload |
370 | 371 | * self::OVERWRITE Overwrite an existing destination file instead of failing |
371 | 372 | * self::OVERWRITE_SAME Overwrite the file if the destination exists and has the |
— | — | @@ -382,8 +383,8 @@ |
383 | 384 | /** |
384 | 385 | * Store a batch of files |
385 | 386 | * |
386 | | - * @param array $triplets (src,zone,dest) triplets as per store() |
387 | | - * @param integer $flags Flags as per store |
| 387 | + * @param $triplets Array: (src,zone,dest) triplets as per store() |
| 388 | + * @param $flags Integer: flags as per store |
388 | 389 | */ |
389 | 390 | abstract function storeBatch( $triplets, $flags = 0 ); |
390 | 391 | |
— | — | @@ -391,18 +392,18 @@ |
392 | 393 | * Pick a random name in the temp zone and store a file to it. |
393 | 394 | * Returns a FileRepoStatus object with the URL in the value. |
394 | 395 | * |
395 | | - * @param string $originalName The base name of the file as specified |
| 396 | + * @param $originalName String: the base name of the file as specified |
396 | 397 | * by the user. The file extension will be maintained. |
397 | | - * @param string $srcPath The current location of the file. |
| 398 | + * @param $srcPath String: the current location of the file. |
398 | 399 | */ |
399 | 400 | abstract function storeTemp( $originalName, $srcPath ); |
400 | 401 | |
401 | 402 | |
402 | 403 | /** |
403 | 404 | * Append the contents of the source path to the given file. |
404 | | - * @param $srcPath string location of the source file |
405 | | - * @param $toAppendPath string path to append to. |
406 | | - * @param $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate |
| 405 | + * @param $srcPath String: location of the source file |
| 406 | + * @param $toAppendPath String: path to append to. |
| 407 | + * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
407 | 408 | * that the source file should be deleted if possible |
408 | 409 | * @return mixed Status or false |
409 | 410 | */ |
— | — | @@ -410,8 +411,8 @@ |
411 | 412 | |
412 | 413 | /** |
413 | 414 | * Remove a temporary file or mark it for garbage collection |
414 | | - * @param string $virtualUrl The virtual URL returned by storeTemp |
415 | | - * @return boolean True on success, false on failure |
| 415 | + * @param $virtualUrl String: the virtual URL returned by storeTemp |
| 416 | + * @return Boolean: true on success, false on failure |
416 | 417 | * STUB |
417 | 418 | */ |
418 | 419 | function freeTemp( $virtualUrl ) { |
— | — | @@ -425,11 +426,11 @@ |
426 | 427 | * Returns a FileRepoStatus object. On success, the value contains "new" or |
427 | 428 | * "archived", to indicate whether the file was new with that name. |
428 | 429 | * |
429 | | - * @param string $srcPath The source path or URL |
430 | | - * @param string $dstRel The destination relative path |
431 | | - * @param string $archiveRel The relative path where the existing file is to |
| 430 | + * @param $srcPath String: the source path or URL |
| 431 | + * @param $dstRel String: the destination relative path |
| 432 | + * @param $archiveRel String: rhe relative path where the existing file is to |
432 | 433 | * be archived, if there is one. Relative to the public zone root. |
433 | | - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate |
| 434 | + * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
434 | 435 | * that the source file should be deleted if possible |
435 | 436 | */ |
436 | 437 | function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) { |
— | — | @@ -447,8 +448,8 @@ |
448 | 449 | |
449 | 450 | /** |
450 | 451 | * Publish a batch of files |
451 | | - * @param array $triplets (source,dest,archive) triplets as per publish() |
452 | | - * @param integer $flags Bitfield, may be FileRepo::DELETE_SOURCE to indicate |
| 452 | + * @param $triplets Array: (source,dest,archive) triplets as per publish() |
| 453 | + * @param $flags Integer: bitfield, may be FileRepo::DELETE_SOURCE to indicate |
453 | 454 | * that the source files should be deleted if possible |
454 | 455 | */ |
455 | 456 | abstract function publishBatch( $triplets, $flags = 0 ); |
— | — | @@ -461,8 +462,8 @@ |
462 | 463 | /** |
463 | 464 | * Checks existence of an array of files. |
464 | 465 | * |
465 | | - * @param array $files URLs (or paths) of files to check |
466 | | - * @param integer $flags Bitwise combination of the following flags: |
| 466 | + * @param $files Array: URLs (or paths) of files to check |
| 467 | + * @param $flags Integer: bitwise combination of the following flags: |
467 | 468 | * self::FILES_ONLY Mark file as existing only if it is a file (not directory) |
468 | 469 | * @return Either array of files and existence flags, or false |
469 | 470 | */ |
— | — | @@ -478,7 +479,7 @@ |
479 | 480 | * assumes a naming scheme in the deleted zone based on content hash, as |
480 | 481 | * opposed to the public zone which is assumed to be unique. |
481 | 482 | * |
482 | | - * @param array $sourceDestPairs Array of source/destination pairs. Each element |
| 483 | + * @param $sourceDestPairs Array of source/destination pairs. Each element |
483 | 484 | * is a two-element array containing the source file path relative to the |
484 | 485 | * public root in the first element, and the archive file path relative |
485 | 486 | * to the deleted zone root in the second element. |
— | — | @@ -490,8 +491,8 @@ |
491 | 492 | * Move a file to the deletion archive. |
492 | 493 | * If no valid deletion archive exists, this may either delete the file |
493 | 494 | * or throw an exception, depending on the preference of the repository |
494 | | - * @param mixed $srcRel Relative path for the file to be deleted |
495 | | - * @param mixed $archiveRel Relative path for the archive location. |
| 495 | + * @param $srcRel Mixed: relative path for the file to be deleted |
| 496 | + * @param $archiveRel Mixed: relative path for the archive location. |
496 | 497 | * Relative to a private archive directory. |
497 | 498 | * @return WikiError object (wikitext-formatted), or true for success |
498 | 499 | */ |
— | — | @@ -589,7 +590,7 @@ |
590 | 591 | * title object. If not, return false. |
591 | 592 | * STUB |
592 | 593 | * |
593 | | - * @param Title $title Title of image |
| 594 | + * @param $title Title of image |
594 | 595 | */ |
595 | 596 | function checkRedirect( $title ) { |
596 | 597 | return false; |
— | — | @@ -600,7 +601,7 @@ |
601 | 602 | * Doesn't do anything for repositories that don't support image redirects. |
602 | 603 | * |
603 | 604 | * STUB |
604 | | - * @param Title $title Title of image |
| 605 | + * @param $title Title of image |
605 | 606 | */ |
606 | 607 | function invalidateImageRedirect( $title ) {} |
607 | 608 | |
Index: trunk/phase3/includes/filerepo/File.php |
— | — | @@ -501,7 +501,7 @@ |
502 | 502 | /** |
503 | 503 | * As createThumb, but returns a ThumbnailImage object. This can |
504 | 504 | * provide access to the actual file, the real size of the thumb, |
505 | | - * and can produce a convenient <img> tag for you. |
| 505 | + * and can produce a convenient \<img\> tag for you. |
506 | 506 | * |
507 | 507 | * For non-image formats, this may return a filetype-specific icon. |
508 | 508 | * |
— | — | @@ -850,7 +850,7 @@ |
851 | 851 | * The archive name should be passed through to recordUpload for database |
852 | 852 | * registration. |
853 | 853 | * |
854 | | - * @param $sourcePath String: local filesystem path to the source image |
| 854 | + * @param $srcPath String: local filesystem path to the source image |
855 | 855 | * @param $flags Integer: a bitwise combination of: |
856 | 856 | * File::DELETE_SOURCE Delete the source file, i.e. move |
857 | 857 | * rather than copy |
Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | /** |
73 | 73 | * Checks if there is a redirect named as $title |
74 | 74 | * |
75 | | - * @param Title $title Title of image |
| 75 | + * @param $title Title of file |
76 | 76 | */ |
77 | 77 | function checkRedirect( $title ) { |
78 | 78 | global $wgMemc; |
— | — | @@ -189,8 +189,8 @@ |
190 | 190 | /** |
191 | 191 | * Invalidates image redirect cache related to that image |
192 | 192 | * |
193 | | - * @param Title $title Title of image |
194 | | - */ |
| 193 | + * @param $title Title of page |
| 194 | + */ |
195 | 195 | function invalidateImageRedirect( $title ) { |
196 | 196 | global $wgMemc; |
197 | 197 | $memcKey = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) ); |
Index: trunk/phase3/includes/filerepo/RepoGroup.php |
— | — | @@ -48,7 +48,9 @@ |
49 | 49 | |
50 | 50 | /** |
51 | 51 | * Construct a group of file repositories. |
52 | | - * @param array $data Array of repository info arrays. |
| 52 | + * |
| 53 | + * @param $localInfo Associative array for local repo's info |
| 54 | + * @param $foreignInfo Array of repository info arrays. |
53 | 55 | * Each info array is an associative array with the 'class' member |
54 | 56 | * giving the class name. The entire array is passed to the repository |
55 | 57 | * constructor as the first parameter. |
— | — | @@ -62,7 +64,8 @@ |
63 | 65 | /** |
64 | 66 | * Search repositories for an image. |
65 | 67 | * You can also use wfFindFile() to do this. |
66 | | - * @param mixed $title Title object or string |
| 68 | + * |
| 69 | + * @param $title Mixed: Title object or string |
67 | 70 | * @param $options Associative array of options: |
68 | 71 | * time: requested time for an archived image, or false for the |
69 | 72 | * current version. An image object will be returned which was |
— | — | @@ -243,8 +246,8 @@ |
244 | 247 | * Call a function for each foreign repo, with the repo object as the |
245 | 248 | * first parameter. |
246 | 249 | * |
247 | | - * @param $callback callback The function to call |
248 | | - * @param $params array Optional additional parameters to pass to the function |
| 250 | + * @param $callback Callback: the function to call |
| 251 | + * @param $params Array: optional additional parameters to pass to the function |
249 | 252 | */ |
250 | 253 | function forEachForeignRepo( $callback, $params = array() ) { |
251 | 254 | foreach( $this->foreignRepos as $repo ) { |
— | — | @@ -258,7 +261,7 @@ |
259 | 262 | |
260 | 263 | /** |
261 | 264 | * Does the installation have any foreign repos set up? |
262 | | - * @return bool |
| 265 | + * @return Boolean |
263 | 266 | */ |
264 | 267 | function hasForeignRepos() { |
265 | 268 | return (bool)$this->foreignRepos; |
Index: trunk/phase3/includes/filerepo/Image.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | * Wrapper for wfFindFile(), for backwards-compatibility only. |
32 | 32 | * Do not use in core code. |
33 | 33 | * |
34 | | - * @param string $name name of the image, used to create a title object using Title::makeTitleSafe |
| 34 | + * @param $name String: name of the image, used to create a title object using Title::makeTitleSafe |
35 | 35 | * @return image object or null if invalid title |
36 | 36 | * @deprecated |
37 | 37 | */ |
— | — | @@ -55,8 +55,8 @@ |
56 | 56 | * Note that fromSharedDirectory will only use the shared path for files |
57 | 57 | * that actually exist there now, and will return local paths otherwise. |
58 | 58 | * |
59 | | - * @param string $name Name of the image, without the leading "Image:" |
60 | | - * @param boolean $fromSharedDirectory Should this be in $wgSharedUploadPath? |
| 59 | + * @param $name String: name of the image, without the leading "Image:" |
| 60 | + * @param $fromSharedDirectory Boolean: Should this be in $wgSharedUploadPath? |
61 | 61 | * @return string URL of $name image |
62 | 62 | * @deprecated |
63 | 63 | */ |
Index: trunk/phase3/includes/filerepo/ForeignDBRepo.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | function publish( $srcPath, $dstRel, $archiveRel, $flags = 0 ) { |
67 | 67 | throw new MWException( get_class($this) . ': write operations are not supported' ); |
68 | 68 | } |
69 | | - function deleteBatch( $fileMap ) { |
| 69 | + function deleteBatch( $sourceDestPairs ) { |
70 | 70 | throw new MWException( get_class($this) . ': write operations are not supported' ); |
71 | 71 | } |
72 | 72 | } |