Index: branches/REL1_16/phase3/includes/upload/UploadFromFile.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | function initializeFromRequest( &$request ) { |
15 | 15 | $desiredDestName = $request->getText( 'wpDestFile' ); |
16 | 16 | if( !$desiredDestName ) |
17 | | - $desiredDestName = $request->getText( 'wpUploadFile' ); |
| 17 | + $desiredDestName = $request->getFileName( 'wpUploadFile' ); |
18 | 18 | return $this->initializePathInfo( |
19 | 19 | $desiredDestName, |
20 | 20 | $request->getFileTempName( 'wpUploadFile' ), |
Property changes on: branches/REL1_16/phase3/includes/upload |
___________________________________________________________________ |
Name: svn:mergeinfo |
21 | 21 | + /branches/REL1_15/phase3/includes/upload:51646 |
/branches/sqlite/includes/upload:58211-58321 |
/branches/wmf-deployment/includes/upload:53381 |
/trunk/phase3/includes/upload:63549,63764,63897-63901,64876,64881,64948,66944 |
Index: branches/REL1_16/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -69,8 +69,8 @@ |
70 | 70 | |
71 | 71 | // Guess the desired name from the filename if not provided |
72 | 72 | $this->mDesiredDestName = $request->getText( 'wpDestFile' ); |
73 | | - if( !$this->mDesiredDestName ) |
74 | | - $this->mDesiredDestName = $request->getText( 'wpUploadFile' ); |
| 73 | + if( !$this->mDesiredDestName && $request->getFileName( 'wpUploadFile' ) !== null ) |
| 74 | + $this->mDesiredDestName = $request->getFileName( 'wpUploadFile' ); |
75 | 75 | $this->mComment = $request->getText( 'wpUploadDescription' ); |
76 | 76 | $this->mLicense = $request->getText( 'wpLicense' ); |
77 | 77 | |
— | — | @@ -221,6 +221,7 @@ |
222 | 222 | |
223 | 223 | 'texttop' => $this->uploadFormTextTop, |
224 | 224 | 'textaftersummary' => $this->uploadFormTextAfterSummary, |
| 225 | + 'destfile' => $this->mDesiredDestName, |
225 | 226 | ) ); |
226 | 227 | $form->setTitle( $this->getTitle() ); |
227 | 228 | |
— | — | @@ -691,7 +692,8 @@ |
692 | 693 | protected $mSessionKey; |
693 | 694 | protected $mHideIgnoreWarning; |
694 | 695 | protected $mDestWarningAck; |
695 | | - |
| 696 | + protected $mDestFile; |
| 697 | + |
696 | 698 | protected $mTextTop; |
697 | 699 | protected $mTextAfterSummary; |
698 | 700 | |
— | — | @@ -709,6 +711,7 @@ |
710 | 712 | |
711 | 713 | $this->mTextTop = $options['texttop']; |
712 | 714 | $this->mTextAfterSummary = $options['textaftersummary']; |
| 715 | + $this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : ''; |
713 | 716 | |
714 | 717 | $sourceDescriptor = $this->getSourceSection(); |
715 | 718 | $descriptor = $sourceDescriptor |
— | — | @@ -870,6 +873,9 @@ |
871 | 874 | 'id' => 'wpDestFile', |
872 | 875 | 'label-message' => 'destfilename', |
873 | 876 | 'size' => 60, |
| 877 | + 'default' => $this->mDestFile, |
| 878 | + # FIXME: hack to work around poor handling of the 'default' option in HTMLForm |
| 879 | + 'nodata' => strval( $this->mDestFile ) !== '', |
874 | 880 | ), |
875 | 881 | 'UploadDescription' => array( |
876 | 882 | 'type' => 'textarea', |
Property changes on: branches/REL1_16/phase3/includes/specials |
___________________________________________________________________ |
Name: svn:mergeinfo |
877 | 883 | - /branches/REL1_15/phase3/includes/specials:51646 |
/branches/sqlite/includes/specials:58211-58321 |
/branches/wmf-deployment/includes/specials:53381,56967 |
/trunk/phase3/includes/specials:63045,63047,63490,63549,63764,63897-63901,64180,64837,64846,64860,64862,64881,64948,64957,65025,65029 |
878 | 884 | + /branches/REL1_15/phase3/includes/specials:51646 |
/branches/sqlite/includes/specials:58211-58321 |
/branches/wmf-deployment/includes/specials:53381,56967 |
/trunk/phase3/includes/specials:63045,63047,63490,63549,63764,63897-63901,64180,64837,64846,64860,64862,64881,64948,64957,65025,65029,66944 |
Index: branches/REL1_16/phase3/RELEASE-NOTES |
— | — | @@ -69,6 +69,9 @@ |
70 | 70 | * Fixed regression in unwatch links sent out in notification emails. When the |
71 | 71 | mailing job was deferred via the job queue, the title was incorrect. |
72 | 72 | * (bug 23534) Fixed SQL query error in API list=allusers. |
| 73 | +* Fixed a bug in uploads for non-JavaScript clients. An empty string was used |
| 74 | + as the default destination filename, instead of the source filename as |
| 75 | + expected. |
73 | 76 | |
74 | 77 | === Changes since 1.16 beta 1 === |
75 | 78 | |