Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -3352,7 +3352,7 @@ |
3353 | 3353 | * Get an object referring to a locally registered file. |
3354 | 3354 | * Returns a valid placeholder object if the file does not exist. |
3355 | 3355 | * |
3356 | | - * @param $title Title or String |
| 3356 | + * @param $title Title|String |
3357 | 3357 | * @return File|null A File, or null if passed an invalid Title |
3358 | 3358 | */ |
3359 | 3359 | function wfLocalFile( $title ) { |
Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -338,7 +338,7 @@ |
339 | 339 | /** |
340 | 340 | * Add header text, inside the form. |
341 | 341 | * @param $msg String complete text of message to display |
342 | | - * @param $section The section to add the header to |
| 342 | + * @param $section string The section to add the header to |
343 | 343 | */ |
344 | 344 | function addHeaderText( $msg, $section = null ) { |
345 | 345 | if ( is_null( $section ) ) { |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -244,8 +244,7 @@ |
245 | 245 | if( |
246 | 246 | !$this->mTokenOk && !$this->mCancelUpload && |
247 | 247 | ( $this->mUpload && $this->mUploadClicked ) |
248 | | - ) |
249 | | - { |
| 248 | + ) { |
250 | 249 | $form->addPreText( wfMsgExt( 'session_fail_preview', 'parseinline' ) ); |
251 | 250 | } |
252 | 251 | |
— | — | @@ -279,7 +278,6 @@ |
280 | 279 | } |
281 | 280 | |
282 | 281 | return $form; |
283 | | - |
284 | 282 | } |
285 | 283 | |
286 | 284 | /** |
— | — | @@ -385,7 +383,7 @@ |
386 | 384 | /** |
387 | 385 | * Show the upload form with error message, but do not stash the file. |
388 | 386 | * |
389 | | - * @param $message HTML string |
| 387 | + * @param $message string HTML string |
390 | 388 | */ |
391 | 389 | protected function showUploadError( $message ) { |
392 | 390 | $message = '<h2>' . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" . |
— | — | @@ -462,11 +460,17 @@ |
463 | 461 | |
464 | 462 | /** |
465 | 463 | * Get the initial image page text based on a comment and optional file status information |
| 464 | + * @param $comment string |
| 465 | + * @param $license string |
| 466 | + * @param $copyStatus string |
| 467 | + * @param $source string |
| 468 | + * @return string |
466 | 469 | */ |
467 | 470 | public static function getInitialPageText( $comment = '', $license = '', $copyStatus = '', $source = '' ) { |
468 | 471 | global $wgUseCopyrightUpload, $wgForceUIMsgAsContentMsg; |
469 | 472 | $wgForceUIMsgAsContentMsg = (array) $wgForceUIMsgAsContentMsg; |
470 | 473 | |
| 474 | + $msg = array(); |
471 | 475 | /* These messages are transcluded into the actual text of the description page. |
472 | 476 | * Thus, forcing them as content messages makes the upload to produce an int: template |
473 | 477 | * instead of hardcoding it there in the uploader language. |
— | — | @@ -510,6 +514,7 @@ |
511 | 515 | * |
512 | 516 | * Note that the page target can be changed *on the form*, so our check |
513 | 517 | * state can get out of sync. |
| 518 | + * @return Bool|String |
514 | 519 | */ |
515 | 520 | protected function getWatchCheck() { |
516 | 521 | if( $this->getUser()->getOption( 'watchdefault' ) ) { |
— | — | @@ -708,6 +713,8 @@ |
709 | 714 | |
710 | 715 | /** |
711 | 716 | * Construct a warning and a gallery from an array of duplicate files. |
| 717 | + * @param $dupes array |
| 718 | + * @return string |
712 | 719 | */ |
713 | 720 | public static function getDupeWarning( $dupes ) { |
714 | 721 | global $wgOut; |
— | — | @@ -749,6 +756,8 @@ |
750 | 757 | |
751 | 758 | protected $mMaxFileSize = array(); |
752 | 759 | |
| 760 | + protected $mMaxUploadSize = array(); |
| 761 | + |
753 | 762 | public function __construct( array $options = array(), IContextSource $context = null ) { |
754 | 763 | $this->mWatch = !empty( $options['watch'] ); |
755 | 764 | $this->mForReUpload = !empty( $options['forreupload'] ); |
— | — | @@ -1109,6 +1118,11 @@ |
1110 | 1119 | * A form field that contains a radio box in the label |
1111 | 1120 | */ |
1112 | 1121 | class UploadSourceField extends HTMLTextField { |
| 1122 | + |
| 1123 | + /** |
| 1124 | + * @param $cellAttributes array |
| 1125 | + * @return string |
| 1126 | + */ |
1113 | 1127 | function getLabelHtml( $cellAttributes = array() ) { |
1114 | 1128 | $id = "wpSourceType{$this->mParams['upload-type']}"; |
1115 | 1129 | $label = Html::rawElement( 'label', array( 'for' => $id ), $this->mLabel ); |
— | — | @@ -1129,6 +1143,9 @@ |
1130 | 1144 | return Html::rawElement( 'td', array( 'class' => 'mw-label' ) + $cellAttributes, $label ); |
1131 | 1145 | } |
1132 | 1146 | |
| 1147 | + /** |
| 1148 | + * @return int |
| 1149 | + */ |
1133 | 1150 | function getSize() { |
1134 | 1151 | return isset( $this->mParams['size'] ) |
1135 | 1152 | ? $this->mParams['size'] |
Index: trunk/extensions/PictureGame/AjaxUploadForm.php |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | * and some bits of code were entirely removed. |
94 | 94 | */ |
95 | 95 | public function execute( $par ) { |
96 | | - global $wgUser, $wgOut, $wgRequest; |
| 96 | + global $wgUser, $wgOut; |
97 | 97 | |
98 | 98 | // Disable the skin etc. |
99 | 99 | $wgOut->setArticleBodyOnly( true ); |
— | — | @@ -359,7 +359,7 @@ |
360 | 360 | |
361 | 361 | # Build a list of IDs for JavaScript insertion |
362 | 362 | $this->mSourceIds = array(); |
363 | | - foreach ( $sourceDescriptor as $key => $field ) { |
| 363 | + foreach ( $sourceDescriptor as $field ) { |
364 | 364 | if ( !empty( $field['id'] ) ) { |
365 | 365 | $this->mSourceIds[] = $field['id']; |
366 | 366 | } |
— | — | @@ -578,6 +578,9 @@ |
579 | 579 | return $handler; |
580 | 580 | } |
581 | 581 | |
| 582 | + /** |
| 583 | + * @param $request WebRequest |
| 584 | + */ |
582 | 585 | function initializeFromRequest( &$request ) { |
583 | 586 | $desiredDestName = $request->getText( 'wpDestFile' ); |
584 | 587 | if( !$desiredDestName ) { |
— | — | @@ -585,10 +588,10 @@ |
586 | 589 | } |
587 | 590 | $prefix = $request->getText( 'callbackPrefix' ); // added for PictureGame |
588 | 591 | $desiredDestName = time() . '-' . $prefix . $desiredDestName; |
589 | | - return $this->initializePathInfo( |
| 592 | + $this->initializePathInfo( |
590 | 593 | $desiredDestName, |
591 | 594 | $request->getFileTempName( 'wpUploadFile' ), |
592 | 595 | $request->getFileSize( 'wpUploadFile' ) |
593 | 596 | ); |
594 | 597 | } |
595 | | -} |
\ No newline at end of file |
| 598 | +} |