Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -557,7 +557,7 @@ |
558 | 558 | public function getUploadUrl() { |
559 | 559 | $this->loadFile(); |
560 | 560 | $uploadTitle = SpecialPage::getTitleFor( 'Upload' ); |
561 | | - return $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) . '&wpReUpload=1' ); |
| 561 | + return $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) . '&wpForReUpload=1' ); |
562 | 562 | } |
563 | 563 | |
564 | 564 | /** |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | $this->mDesiredDestName = $request->getText( 'wpDestFile' ); |
64 | 64 | $this->mIgnoreWarning = $request->getCheck( 'wpIgnoreWarning' ); |
65 | 65 | $this->mComment = $request->getText( 'wpUploadDescription' ); |
| 66 | + $this->mForReUpload = $request->getBool( 'wpForReUpload' ); |
66 | 67 | $this->mReUpload = $request->getCheck( 'wpReUpload' ); |
67 | 68 | |
68 | 69 | if( !$request->wasPosted() ) { |
— | — | @@ -73,8 +74,6 @@ |
74 | 75 | # Placeholders for text injection by hooks (empty per default) |
75 | 76 | $this->uploadFormTextTop = ""; |
76 | 77 | $this->uploadFormTextAfterSummary = ""; |
77 | | - |
78 | | - $this->mReUpload = $request->getCheck( 'wpReUpload' ); |
79 | 78 | $this->mUploadClicked = $request->getCheck( 'wpUpload' ); |
80 | 79 | |
81 | 80 | $this->mLicense = $request->getText( 'wpLicense' ); |
— | — | @@ -566,7 +565,7 @@ |
567 | 566 | * Try actually saving the thing... |
568 | 567 | * It will show an error form on failure. |
569 | 568 | */ |
570 | | - if( !$this->mReUpload ) { |
| 569 | + if( !$this->mForReUpload ) { |
571 | 570 | $pageText = self::getInitialPageText( $this->mComment, $this->mLicense, |
572 | 571 | $this->mCopyrightStatus, $this->mCopyrightSource ); |
573 | 572 | } |
— | — | @@ -770,7 +769,7 @@ |
771 | 770 | $title = $file->getTitle(); |
772 | 771 | # Don't throw the warning when the titles are the same, it's a reupload |
773 | 772 | # and highly redundant. |
774 | | - if ( !$title->equals( $destinationTitle ) || !$this->mReUpload ) { |
| 773 | + if ( !$title->equals( $destinationTitle ) || !$this->mForReUpload ) { |
775 | 774 | $msg .= $title->getPrefixedText() . |
776 | 775 | "|" . $title->getText() . "\n"; |
777 | 776 | } |
— | — | @@ -1070,7 +1069,7 @@ |
1071 | 1070 | $sourcefilename = wfMsgExt( 'sourcefilename', array( 'parseinline', 'escapenoentities' ) ); |
1072 | 1071 | $destfilename = wfMsgExt( 'destfilename', array( 'parseinline', 'escapenoentities' ) ); |
1073 | 1072 | |
1074 | | - $msg = $this->mReUpload ? 'filereuploadsummary' : 'fileuploadsummary'; |
| 1073 | + $msg = $this->mForReUpload ? 'filereuploadsummary' : 'fileuploadsummary'; |
1075 | 1074 | $summary = wfMsgExt( $msg, 'parseinline' ); |
1076 | 1075 | |
1077 | 1076 | $licenses = new Licenses(); |
— | — | @@ -1087,7 +1086,7 @@ |
1088 | 1087 | |
1089 | 1088 | $watchChecked = $this->watchCheck() ? 'checked="checked"' : ''; |
1090 | 1089 | # Re-uploads should not need "file exist already" warnings |
1091 | | - $warningChecked = ($this->mIgnoreWarning || $this->mReUpload) ? 'checked="checked"' : ''; |
| 1090 | + $warningChecked = ($this->mIgnoreWarning || $this->mForReUpload) ? 'checked="checked"' : ''; |
1092 | 1091 | |
1093 | 1092 | // Prepare form for upload or upload/copy |
1094 | 1093 | if( $wgAllowCopyUploads && $wgUser->isAllowed( 'upload_by_url' ) ) { |
— | — | @@ -1123,7 +1122,7 @@ |
1124 | 1123 | $destOnkeyup = ''; |
1125 | 1124 | } |
1126 | 1125 | # Uploading a new version? If so, the name is fixed. |
1127 | | - $on = $this->mReUpload ? "readonly='readonly'" : ""; |
| 1126 | + $on = $this->mForReUpload ? "readonly='readonly'" : ""; |
1128 | 1127 | |
1129 | 1128 | $encComment = htmlspecialchars( $this->mComment ); |
1130 | 1129 | |
— | — | @@ -1171,7 +1170,7 @@ |
1172 | 1171 | <tr>" |
1173 | 1172 | ); |
1174 | 1173 | # Re-uploads should not need license info |
1175 | | - if ( !$this->mReUpload && $licenseshtml != '' ) { |
| 1174 | + if ( !$this->mForReUpload && $licenseshtml != '' ) { |
1176 | 1175 | global $wgStylePath; |
1177 | 1176 | $wgOut->addHTML( " |
1178 | 1177 | <td class='mw-label'> |
— | — | @@ -1197,7 +1196,7 @@ |
1198 | 1197 | } |
1199 | 1198 | } |
1200 | 1199 | |
1201 | | - if ( !$this->mReUpload && $wgUseCopyrightUpload ) { |
| 1200 | + if ( !$this->mForReUpload && $wgUseCopyrightUpload ) { |
1202 | 1201 | $filestatus = wfMsgExt( 'filestatus', 'escapenoentities' ); |
1203 | 1202 | $copystatus = htmlspecialchars( $this->mCopyrightStatus ); |
1204 | 1203 | $filesource = wfMsgExt( 'filesource', 'escapenoentities' ); |
— | — | @@ -1250,7 +1249,7 @@ |
1251 | 1250 | </tr>" . |
1252 | 1251 | Xml::closeElement( 'table' ) . |
1253 | 1252 | Xml::hidden( 'wpDestFileWarningAck', '', array( 'id' => 'wpDestFileWarningAck' ) ) . |
1254 | | - xml::hidden( 'wpReUpload', $this->mReUpload ) . |
| 1253 | + Xml::hidden( 'wpForReUpload', $this->mForReUpload ) . |
1255 | 1254 | Xml::closeElement( 'fieldset' ) . |
1256 | 1255 | Xml::closeElement( 'form' ) |
1257 | 1256 | ); |