Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | /** |
13 | 13 | * Constructor : initialise object |
14 | 14 | * Get data POSTed through the form and assign them to the object |
15 | | - * @param WebRequest $request Data posted. |
| 15 | + * @param $request WebRequest : data posted. |
16 | 16 | */ |
17 | 17 | public function __construct( $request = null ) { |
18 | 18 | global $wgRequest; |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | /** |
55 | 55 | * Initialize instance variables from request and create an Upload handler |
56 | 56 | * |
57 | | - * @param WebRequest $request The request to extract variables from |
| 57 | + * @param $request WebRequest: the request to extract variables from |
58 | 58 | */ |
59 | 59 | protected function loadRequest( $request ) { |
60 | 60 | global $wgUser; |
— | — | @@ -106,8 +106,8 @@ |
107 | 107 | * Handle permission checking elsewhere in order to be able to show |
108 | 108 | * custom error messages. |
109 | 109 | * |
110 | | - * @param User $user |
111 | | - * @return bool |
| 110 | + * @param $user User object |
| 111 | + * @return Boolean |
112 | 112 | */ |
113 | 113 | public function userCanExecute( $user ) { |
114 | 114 | return UploadBase::isEnabled() && parent::userCanExecute( $user ); |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | /** |
189 | 189 | * Show the main upload form |
190 | 190 | * |
191 | | - * @param mixed $form An HTMLForm instance or HTML string to show |
| 191 | + * @param $form Mixed: an HTMLForm instance or HTML string to show |
192 | 192 | */ |
193 | 193 | protected function showUploadForm( $form ) { |
194 | 194 | # Add links if file was previously deleted |
— | — | @@ -207,8 +207,9 @@ |
208 | 208 | /** |
209 | 209 | * Get an UploadForm instance with title and text properly set. |
210 | 210 | * |
211 | | - * @param string $message HTML string to add to the form |
212 | | - * @param string $sessionKey Session key in case this is a stashed upload |
| 211 | + * @param $message String: HTML string to add to the form |
| 212 | + * @param $sessionKey String: session key in case this is a stashed upload |
| 213 | + * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box |
213 | 214 | * @return UploadForm |
214 | 215 | */ |
215 | 216 | protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) { |
— | — | @@ -290,7 +291,7 @@ |
291 | 292 | * essentially means that UploadBase::VERIFICATION_ERROR and |
292 | 293 | * UploadBase::EMPTY_FILE should not be passed here. |
293 | 294 | * |
294 | | - * @param string $message HTML message to be passed to mainUploadForm |
| 295 | + * @param $message String: HTML message to be passed to mainUploadForm |
295 | 296 | */ |
296 | 297 | protected function showRecoverableUploadError( $message ) { |
297 | 298 | $sessionKey = $this->mUpload->stashSession(); |
— | — | @@ -305,7 +306,7 @@ |
306 | 307 | * Stashes the upload, shows the main form, but adds an "continue anyway button". |
307 | 308 | * Also checks whether there are actually warnings to display. |
308 | 309 | * |
309 | | - * @param array $warnings |
| 310 | + * @param $warnings Array |
310 | 311 | * @return boolean true if warnings were displayed, false if there are no |
311 | 312 | * warnings and the should continue processing like there was no warning |
312 | 313 | */ |
— | — | @@ -360,7 +361,7 @@ |
361 | 362 | /** |
362 | 363 | * Show the upload form with error message, but do not stash the file. |
363 | 364 | * |
364 | | - * @param string $message |
| 365 | + * @param $message String |
365 | 366 | */ |
366 | 367 | protected function showUploadError( $message ) { |
367 | 368 | $message = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" . |
— | — | @@ -491,7 +492,7 @@ |
492 | 493 | /** |
493 | 494 | * Provides output to the user for a result of UploadBase::verifyUpload |
494 | 495 | * |
495 | | - * @param array $details Result of UploadBase::verifyUpload |
| 496 | + * @param $details Array: result of UploadBase::verifyUpload |
496 | 497 | */ |
497 | 498 | protected function processVerificationError( $details ) { |
498 | 499 | global $wgFileExtensions, $wgLang; |
— | — | @@ -556,7 +557,8 @@ |
557 | 558 | |
558 | 559 | /** |
559 | 560 | * Remove a temporarily kept file stashed by saveTempUploadedFile(). |
560 | | - * @return success |
| 561 | + * |
| 562 | + * @return Boolean: success |
561 | 563 | */ |
562 | 564 | protected function unsaveUploadedFile() { |
563 | 565 | global $wgOut; |
— | — | @@ -578,8 +580,8 @@ |
579 | 581 | * Formats a result of UploadBase::getExistsWarning as HTML |
580 | 582 | * This check is static and can be done pre-upload via AJAX |
581 | 583 | * |
582 | | - * @param array $exists The result of UploadBase::getExistsWarning |
583 | | - * @return string Empty string if there is no warning or an HTML fragment |
| 584 | + * @param $exists Array: the result of UploadBase::getExistsWarning |
| 585 | + * @return String: empty string if there is no warning or an HTML fragment |
584 | 586 | */ |
585 | 587 | public static function getExistsWarning( $exists ) { |
586 | 588 | global $wgUser, $wgContLang; |
— | — | @@ -635,8 +637,8 @@ |
636 | 638 | /** |
637 | 639 | * Get a list of warnings |
638 | 640 | * |
639 | | - * @param string local filename, e.g. 'file exists', 'non-descriptive filename' |
640 | | - * @return array list of warning messages |
| 641 | + * @param $filename String: local filename, e.g. 'file exists', 'non-descriptive filename' |
| 642 | + * @return Array: list of warning messages |
641 | 643 | */ |
642 | 644 | public static function ajaxGetExistsWarning( $filename ) { |
643 | 645 | $file = wfFindFile( $filename ); |
— | — | @@ -734,7 +736,7 @@ |
735 | 737 | * Get the descriptor of the fieldset that contains the file source |
736 | 738 | * selection. The section is 'source' |
737 | 739 | * |
738 | | - * @return array Descriptor array |
| 740 | + * @return Array: descriptor array |
739 | 741 | */ |
740 | 742 | protected function getSourceSection() { |
741 | 743 | global $wgLang, $wgUser, $wgRequest; |
— | — | @@ -812,7 +814,7 @@ |
813 | 815 | /** |
814 | 816 | * Get the messages indicating which extensions are preferred and prohibitted. |
815 | 817 | * |
816 | | - * @return string HTML string containing the message |
| 818 | + * @return String: HTML string containing the message |
817 | 819 | */ |
818 | 820 | protected function getExtensionsMessage() { |
819 | 821 | # Print a list of allowed file extensions, if so configured. We ignore |
— | — | @@ -849,7 +851,7 @@ |
850 | 852 | * Get the descriptor of the fieldset that contains the file description |
851 | 853 | * input. The section is 'description' |
852 | 854 | * |
853 | | - * @return array Descriptor array |
| 855 | + * @return Array: descriptor array |
854 | 856 | */ |
855 | 857 | protected function getDescriptionSection() { |
856 | 858 | global $wgUser, $wgOut; |
— | — | @@ -927,7 +929,7 @@ |
928 | 930 | * Get the descriptor of the fieldset that contains the upload options, |
929 | 931 | * such as "watch this file". The section is 'options' |
930 | 932 | * |
931 | | - * @return array Descriptor array |
| 933 | + * @return Array: descriptor array |
932 | 934 | */ |
933 | 935 | protected function getOptionsSection() { |
934 | 936 | global $wgUser; |
— | — | @@ -970,9 +972,6 @@ |
971 | 973 | |
972 | 974 | /** |
973 | 975 | * Add upload JS to $wgOut |
974 | | - * |
975 | | - * @param $autofill Boolean: Whether or not to autofill the destination |
976 | | - * filename text box |
977 | 976 | */ |
978 | 977 | protected function addUploadJS() { |
979 | 978 | global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI; |