Index: trunk/extensions/SemanticForms/specials/SF_UploadWindow2.php |
— | — | @@ -213,6 +213,7 @@ |
214 | 214 | 'forreupload' => $this->mForReUpload, |
215 | 215 | 'sessionkey' => $sessionKey, |
216 | 216 | 'hideignorewarning' => $hideIgnoreWarning, |
| 217 | + 'destfile' => $this->mDesiredDestName, |
217 | 218 | 'sfInputID' => $this->mInputID, |
218 | 219 | 'sfDelimiter' => $this->mDelimiter, |
219 | 220 | ) ); |
— | — | @@ -713,6 +714,7 @@ |
714 | 715 | $this->mSessionKey = isset( $options['sessionkey'] ) |
715 | 716 | ? $options['sessionkey'] : ''; |
716 | 717 | $this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] ); |
| 718 | + $this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : ''; |
717 | 719 | |
718 | 720 | $sourceDescriptor = $this->getSourceSection(); |
719 | 721 | $descriptor = $sourceDescriptor |
— | — | @@ -1032,7 +1034,10 @@ |
1033 | 1035 | 'wgAjaxUploadDestCheck' => $wgUseAjax && $wgAjaxUploadDestCheck, |
1034 | 1036 | 'wgAjaxLicensePreview' => $wgUseAjax && $wgAjaxLicensePreview, |
1035 | 1037 | 'wgEnableFirefogg' => (bool)$wgEnableFirefogg, |
1036 | | - 'wgUploadAutoFill' => (bool)$autofill, |
| 1038 | + 'wgUploadAutoFill' => (bool)$autofill && |
| 1039 | + // If we received mDestFile from the request, don't autofill |
| 1040 | + // the wpDestFile textbox |
| 1041 | + $this->mDestFile === '', |
1037 | 1042 | 'wgUploadSourceIds' => $this->mSourceIds, |
1038 | 1043 | 'wgStrictFileExtensions' => $wgStrictFileExtensions, |
1039 | 1044 | 'wgCapitalizeUploads' => MWNamespace::isCapitalized( NS_FILE ), |