(bug 17707) Show file destination as plain text if &wpForReUpload=1
authorX! <soxred93@users.mediawiki.org>
Fri, 27 Feb 2009 20:27:51 +0000 (20:27 +0000)
committerX! <soxred93@users.mediawiki.org>
Fri, 27 Feb 2009 20:27:51 +0000 (20:27 +0000)
RELEASE-NOTES
includes/specials/SpecialUpload.php

index acd1175..e67e277 100644 (file)
@@ -226,6 +226,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17648) Prevent floats from intruding into edit area in previews if no toolbar present
 * (bug 16899) DISPLAYTITLE should allow Arabic and Persian harakats
 * (bug 17692) Added (list of members) link to 'user' in Special:Listgrouprights
+* (bug 17707) Show file destination as plain text if &wpForReUpload=1
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 2d4b7f9..8849b55 100644 (file)
@@ -1121,10 +1121,8 @@ wgUploadAutoFill = {$autofill};
                        $warningRow = '';
                        $destOnkeyup = '';
                }
-               # Uploading a new version? If so, the name is fixed.
-               $on = $this->mForReUpload ? "readonly='readonly'" : "";
-
                $encComment = htmlspecialchars( $this->mComment );
+               
 
                $wgOut->addHTML(
                         Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL(),
@@ -1152,10 +1150,27 @@ wgUploadAutoFill = {$autofill};
                                <td class='mw-label'>
                                        <label for='wpDestFile'>{$destfilename}</label>
                                </td>
-                               <td class='mw-input'>
-                                       <input tabindex='2' type='text' name='wpDestFile' id='wpDestFile' size='60'
-                                               value=\"{$encDestName}\" onchange='toggleFilenameFiller()' $on $destOnkeyup />
-                               </td>
+                               <td class='mw-input'>"
+               );
+               if( $this->mForReUpload ) {
+                       $wgOut->addHTML(
+                               "<input tabindex='2' type='hidden' name='wpDestFile' id='wpDestFile' 
+                                       value='{$encDestName}' />" . 
+                               "<tt>" .
+                               $encDestName .
+                               "</tt>"
+                       );
+               }
+               else {
+                       $wgOut->addHTML(
+                               "<input tabindex='2' type='text' name='wpDestFile' id='wpDestFile' size='60'
+                                               value='{$encDestName}' onchange='toggleFilenameFiller()' $destOnkeyup />"
+                       );
+               }
+               
+
+               $wgOut->addHTML(
+                               "</td>
                        </tr>
                        <tr>
                                <td class='mw-label'>