(bug 23465) Don't ignore the predefined destination filename on Special:Upload...
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index dee0301..3307064 100644 (file)
@@ -1035,7 +1035,10 @@ class UploadForm extends HTMLForm {
                $scriptVars = array(
                        'wgAjaxUploadDestCheck' => $useAjaxDestCheck,
                        'wgAjaxLicensePreview' => $useAjaxLicensePreview,
-                       'wgUploadAutoFill' => !$this->mForReUpload,
+                       'wgUploadAutoFill' => !$this->mForReUpload &&
+                               // If we received mDestFile from the request, don't autofill
+                               // the wpDestFile textbox
+                               $this->mDestFile === '',
                        'wgUploadSourceIds' => $this->mSourceIds,
                );